feat: implement geometry domain with repository, service, and data conversion utilities

This commit is contained in:
2026-05-06 06:43:57 +07:00
parent fcb7f321dd
commit fe9543d896
9 changed files with 335 additions and 159 deletions

View File

@@ -143,6 +143,13 @@ func Int2ToInt16Ptr(v pgtype.Int2) *int16 {
return &int16Val
}
func Int2ToInt16(v pgtype.Int2) int16 {
if v.Valid {
return v.Int16
}
return 0
}
func PtrFloat64ToInt4(v *float64) pgtype.Int4 {
if v == nil {
return pgtype.Int4{Valid: false}