Custom types, arrays and PostGIS are frequently presented together since geospatial data is often complex and multidimensional.
geography
and geometry
types are now available in your Postgres.
todos
tableaddress
column by wrapping the value in single quotes and comma separate the different location_address properties.
'("1000 S Colorado Blvd.","Denver","CO",80211)'
contact_numbers
column, by surrounding the comma-separated array items in curly braces.
'{000-000-0000, 000-000-0000, 000-000-0000}'
location
column by using the st_point
function and pass in the latitude and longitude
st_point(39.742043, -104.991531)
location |
---|
0101000020E6100000E59CD843FBDE4340E9818FC18AC052C0 |
TEXT
in the AppSchema. The Postgres PostGIS capabilities are not available because the PowerSync SDK uses SQLite, which only has a limited number of types. This means that everything is replicated into the SQLite database as TEXT values.(1000 S Colorado Blvd.,Denver,CO,80211)
{000-000-0000, 000-000-0000, 000-000-0000}
geography
type is transformed into an encoded form of the value.
st_point(39.742043, -104.991531)
then it is shown as 0101000020E6100000E59CD843FBDE4340E9818FC18AC052C0
ST_AsGeoJSON
ST_AsText
ST_X
ST_Y
geography
or geometry
.