From f0771e537a2d96ec4384e3333dbdc72e0ef152e8 Mon Sep 17 00:00:00 2001 From: cbullinger Date: Wed, 6 Dec 2023 09:54:55 -0500 Subject: [PATCH] Update geospatial for sync support --- .../important-cant-persist-geospatial.rst | 6 ++++++ .../model-data/data-types/geospatials.txt | 14 ++++++++++++- source/sdk/dotnet/sync/flexible-sync.txt | 11 ++++++++++ .../realm-database/schemas/geospatials.txt | 17 +++++++++------- source/sdk/kotlin/sync/subscribe.txt | 20 +++++++++++++++++-- .../node/model-data/data-types/geospatial.txt | 12 ++++++++++- source/sdk/node/sync/flexible-sync.txt | 8 ++++++++ .../model-data/data-types/geospatial.txt | 12 ++++++++++- .../react-native/sync-data/flexible-sync.txt | 8 ++++++++ 9 files changed, 96 insertions(+), 12 deletions(-) create mode 100644 source/includes/important-cant-persist-geospatial.rst diff --git a/source/includes/important-cant-persist-geospatial.rst b/source/includes/important-cant-persist-geospatial.rst new file mode 100644 index 0000000000..afcd6e9c88 --- /dev/null +++ b/source/includes/important-cant-persist-geospatial.rst @@ -0,0 +1,6 @@ +.. important:: Cannot Persist Geospatial Data Types + + Currently, geospatial data types *cannot* be persisted. For example, you + can't declare a property that is of type ``GeoBox``. + + These types can only be used as arguments for geospatial queries. \ No newline at end of file diff --git a/source/sdk/dotnet/model-data/data-types/geospatials.txt b/source/sdk/dotnet/model-data/data-types/geospatials.txt index 4da747131c..b1aa58952c 100644 --- a/source/sdk/dotnet/model-data/data-types/geospatials.txt +++ b/source/sdk/dotnet/model-data/data-types/geospatials.txt @@ -10,16 +10,28 @@ Geospatial Data Types - .NET SDK :depth: 2 :class: singlecol +.. versionadded:: 11.1.0 + Geospatial data, or "geodata", specifies points and geometric objects on the Earth's surface. With the geodata types, you can create queries that check whether a given point is contained within a shape. For example, you can find all coffee shops within 15 km of a specified point. -.. include:: /includes/no-geospatial-sync.rst +.. versionchanged:: 11.6.1 + Geospatial data supported in Atlas Device Sync + +Realm .NET SDK version 11.16.1 and later adds support for geospatial data +in Atlas Device Sync. This allows you to subscribe to geospatial queries +in a synced realm. For more information, refer to :ref:``. + +If you try to subscribe to a geospatial query with an older version of the SDK, +you will receive a server error and cause a compensating write. Geospatial Data Types --------------------- +.. include:: /includes/important-cant-persist-geospatial.rst + .. _geopoint: GeoPoint diff --git a/source/sdk/dotnet/sync/flexible-sync.txt b/source/sdk/dotnet/sync/flexible-sync.txt index f1b9b64cdf..d86826718c 100644 --- a/source/sdk/dotnet/sync/flexible-sync.txt +++ b/source/sdk/dotnet/sync/flexible-sync.txt @@ -68,6 +68,17 @@ specific object type. In your Flexible Sync subscriptions, you can have subscriptions on several different object types or several queries on the same object type. +You can't create subscriptions for :ref:`asymmetric objects ` and +because they only send data to your App Services backend. + +In the Realm .NET version 11.6.1 and later, you can create subscriptions to +geospatial queries. If you try to subscribe to a geospatial query with an +older version of the SDK, you will receive a server error and cause a +compensating write. + +For more information, refer to :ref:`` in the App Services +documentation. + .. _dotnet-sync-add-subscription: Add a Subscription diff --git a/source/sdk/kotlin/realm-database/schemas/geospatials.txt b/source/sdk/kotlin/realm-database/schemas/geospatials.txt index 20d2cb6033..0030b1e450 100644 --- a/source/sdk/kotlin/realm-database/schemas/geospatials.txt +++ b/source/sdk/kotlin/realm-database/schemas/geospatials.txt @@ -20,7 +20,15 @@ that support querying with geospatial data. These queries can check whether a gi point is contained within a shape. For example, you can find all coffee shops within 15 km of a specified point. -.. include:: /includes/no-geospatial-sync.rst +.. versionchanged:: 1.13.0 + Geospatial data supported in Atlas Device Sync + +Kotlin SDK version 1.13.0 and later adds support for geospatial data +in Atlas Device Sync. This allows you to subscribe to geospatial queries +in a synced realm. For more information, refer to :ref:``. + +If you try to subscribe to a geospatial query with an older version of the SDK, +you will receive a server error and cause a compensating write. Geospatial Data Types --------------------- @@ -32,12 +40,7 @@ The Kotlin SDK supports geospatial queries using the following data types: - GeoBox - GeoPolygon -.. important:: Cannot Persist Geospatial Data Types - - Currently, geospatial data types *cannot* be persisted. For example, you - can't declare a property that is of type ``GeoBox``. - - These types can only be used as arguments for geospatial queries. +.. include:: /includes/important-cant-persist-geospatial.rst .. _kotlin-geopoint: diff --git a/source/sdk/kotlin/sync/subscribe.txt b/source/sdk/kotlin/sync/subscribe.txt index 03145ef155..1ab6b12b12 100644 --- a/source/sdk/kotlin/sync/subscribe.txt +++ b/source/sdk/kotlin/sync/subscribe.txt @@ -56,8 +56,10 @@ You might have multiple subscriptions if you have many types of Realm objects. You can also have multiple subscriptions on the same object type. -However, note the following if you use :ref:`linked objects ` or -:ref:`asymmetric objects ` in your app: +However, if you use :ref:`linked objects `, +:ref:`asymmetric objects `, or +:ref:`geospatial data ` in your app, refer the following +sections for additional information: Linked Objects `````````````` @@ -80,6 +82,20 @@ those objects. If your app contains asymmetric objects and non-asymmetric object same realm, you can add Flexible Sync subscription queries for the non-asymmetric objects. +Geospatial Data +``````````````` + +.. versionchanged:: 1.13.0 + Geospatial data supported in Atlas Device Sync + +In Kotlin SDK version 1.13.0 and later, you can create subscriptions to +geospatial queries. If you try to subscribe to a geospatial query with an +older version of the SDK, you will receive a server error and cause a +compensating write. + +For more information, refer to :ref:`` in the App Services +documentation. + Initial Subscriptions ~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/node/model-data/data-types/geospatial.txt b/source/sdk/node/model-data/data-types/geospatial.txt index fcb5a97b9b..cc37326736 100644 --- a/source/sdk/node/model-data/data-types/geospatial.txt +++ b/source/sdk/node/model-data/data-types/geospatial.txt @@ -17,11 +17,21 @@ surface. With the geodata types, you can create queries that check whether a giv point is contained within a shape. For example, you can find all coffee shops within 15 km of a specified point. -.. include:: /includes/no-geospatial-sync.rst +.. versionchanged:: 12.3.0 + Geospatial data supported in Atlas Device Sync + +Realm Node.js SDK v12.3.0 and later adds support for geospatial data +in Atlas Device Sync. This allows you to subscribe to geospatial queries +in a synced realm. For more information, refer to :ref:``. + +If you try to subscribe to a geospatial query with an older version of the SDK, +you will receive a server error and cause a compensating write. Geospatial Data Types --------------------- +.. include:: /includes/important-cant-persist-geospatial.rst + .. _node-geopoint: GeoPoint diff --git a/source/sdk/node/sync/flexible-sync.txt b/source/sdk/node/sync/flexible-sync.txt index e0c5740220..27df087155 100644 --- a/source/sdk/node/sync/flexible-sync.txt +++ b/source/sdk/node/sync/flexible-sync.txt @@ -24,6 +24,14 @@ You can't create subscriptions for :ref:`Data Ingest ` and :ref:`asymmetric objects ` because they only send data to your app's backend. +In the Realm Node.js SDK v12.3.0 and later, you can create subscriptions to +geospatial queries. If you try to subscribe to a geospatial query with an +older version of the SDK, you will receive a server error and cause a +compensating write. + +For more information, refer to :ref:`` in the App Services +documentation. + .. important:: Flexible Sync Query Limitations Flexible Sync subscriptions only support a subset of the RQL query operators. diff --git a/source/sdk/react-native/model-data/data-types/geospatial.txt b/source/sdk/react-native/model-data/data-types/geospatial.txt index aa783b6146..b59effbd96 100644 --- a/source/sdk/react-native/model-data/data-types/geospatial.txt +++ b/source/sdk/react-native/model-data/data-types/geospatial.txt @@ -17,11 +17,21 @@ surface. With the geodata types, you can create queries that check whether a giv point is contained within a shape. For example, you can find all coffee shops within 15 km of a specified point. -.. include:: /includes/no-geospatial-sync.rst +.. versionchanged:: 12.3.0 + Geospatial data supported in Atlas Device Sync + +Realm.js v12.3.0 and later adds support for geospatial data +in Atlas Device Sync. This allows you to subscribe to geospatial queries +in a synced realm. For more information, refer to :ref:``. + +If you try to subscribe to a geospatial query with an older version of the SDK, +you will receive a server error and cause a compensating write. Geospatial Data Types --------------------- +.. include:: /includes/important-cant-persist-geospatial.rst + To query against geospatial data, you can use the ``geoWithin`` operator with :ref:`RQL `. The ``geoWithin`` operator takes the ``coordinates`` property of an embedded object that defines the point we're querying, and diff --git a/source/sdk/react-native/sync-data/flexible-sync.txt b/source/sdk/react-native/sync-data/flexible-sync.txt index 7bc17d2525..fa6c320214 100644 --- a/source/sdk/react-native/sync-data/flexible-sync.txt +++ b/source/sdk/react-native/sync-data/flexible-sync.txt @@ -25,6 +25,14 @@ You can't create subscriptions for :ref:`Data Ingest ` and :ref:`asymmetric objects ` because they only send data to your App Services backend. +In the Realm.js v12.3.0 and later, you can create subscriptions to +geospatial queries. If you try to subscribe to a geospatial query with an +older version of the SDK, you will receive a server error and cause a +compensating write. + +For more information, refer to :ref:`` in the App Services +documentation. + .. important:: Flexible Sync Query Limitations Flexible Sync subscriptions only support a subset of the RQL query operators.