General
New clients need to check the new Sync capability to determine if a feature service has been configured to use sync.
Older clients have no knowledge of this property; however, properties used by older clients are still supported. Thus, a client written for an older server will continue to work when the server is upgraded to the newest release.
Older clients check the supports
property to determine if the service supports the API. If true
, the clients then check properties of the layers to be used with Create Replica to ensure the following:
- All layers must have a GlobalID field.
- All layers must have the same value for the
sync
property. Either all can return changes on sync (C a n Return Changes true
) or none can return changes on sync (false
). If all arefalse
, replacement data is returned on sync.
If supports
is false
, the service cannot take part in sync at all.
LayerQueries without queryOption
If a service does not have the sync
property or has a value of false
, the older syntax of layer
applies, as below.
Description
In addition to the layers
and geometry
parameters, the layer
parameter can be used to further define what is replicated. This parameter allows you to set properties on a per-layer or per-table basis. Only the properties for the layers and tables that you want change from the default are required. The properties include the following:
where
—Defines an attribute query for a layer or table. The default is no where clause.use
—Determines whether or not to apply the geometry for the layer. The default isGeometry true
. If set tofalse
, features from the layer that intersect the geometry are not added.include
—Determines whether or not to add related rows. The default isRelated true
.
Syntax
layerQueries={ "<Layer_or_tableID1>" : {"where":"attribute_query", "useGeometry": <true | false>, "includeRelated" : <true | false>}, "<Layer_or_tableID2>: {.}}
Example
layer
Queries={"1":{"use Geometry" : false}} layer
Queries={"0":{"where": "requires_ inspection" = True}, "1":{"use Geometry " : false}} layer
Queries={"0":{"use Geometry" : false, "include Related" : false}}, "1":{"use Geometry" : false}}