1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-30 17:15:36 +02:00

added new geoPoint field

This commit is contained in:
Gani Georgiev
2025-04-02 11:38:19 +03:00
parent f3a836eb7c
commit 4c5abd5bd9
60 changed files with 1373 additions and 1143 deletions

View File

@@ -969,6 +969,13 @@ func (m *Record) GetDateTime(key string) types.DateTime {
return d
}
// GetGeoPoint returns the data value for "key" as a GeoPoint instance.
func (m *Record) GetGeoPoint(key string) types.GeoPoint {
point := types.GeoPoint{}
_ = point.Scan(m.Get(key))
return point
}
// GetStringSlice returns the data value for "key" as a slice of non-zero unique strings.
func (m *Record) GetStringSlice(key string) []string {
return list.ToUniqueStringSlice(m.Get(key))