ArcGISKit Documentation

Function query(layer​Queries:​return​Geometry:​return​Object​IDs:​return​Count:​return​Z:​return​M:​geometry​Precision:​return​True​Curves:​sql​Format:​gdb​Version:​)

public func query(
		layerQueries: [Self.LayerQuery],
		returnGeometry: Bool = true,
		returnObjectIDs: Bool = false,
		returnCount: Bool = false,
		returnZ: Bool = false,
		returnM: Bool = false,
		geometryPrecision: Int? = nil,
		returnTrueCurves: Bool = false,
		sqlFormat: SQLFormat = .none,
		// useStandardizedQuery: Bool = false,
		gdbVersion: String? = nil
	) 

Query the FeatureServer.

  • Reference: https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-.htm

Parameters

layer​Queries [Self.​Layer​Query]

The queries you want to perform.

return​Geometry Bool

If `true``, the result includes the geometry associated with each feature returned.

return​Object​IDs Bool

If true, the response only includes an array of object IDs for each layer. / Otherwise, the response is a feature set. / While there is a limit to the number of features included in the feature set response, there is no limit to the number of object IDs returned in the ID array response. Clients can exploit this to get all the query conforming object IDs by specifying returnIdsOnly as true and subsequently requesting feature sets for subsets of object IDs.

return​Count Bool

If true, the response only includes the count (number of features/records) that would be returned by a query. Otherwise, the response is a feature set.

return​Z Bool

If true, z-values are included in the results if the features have z-values. Otherwise, z-values are not returned. This parameter only applies if returnGeometry is true and at least one of the layer's hasZ properties is true.

return​M Bool

If true, m-values are included in the results if the features have m-values. Otherwise, m-values are not returned. This parameter only applies if returnGeometry`` is true and at least one of the layer's hasMproperties is true``.

geometry​Precision Int?

The number of decimal places in the response geometries returned by the query operation. This applies to x- and y-values only (not m- or z-values).

return​True​Curves Bool

This option was added at 10.5. When set to true, the query returns true curves in output geometries. When set to false, curves are converted to densified polylines or polygons.

sql​Format SQLFormat

[This parameter] can be either standard SQL-92 FeatureServer\SQLFormat\standard or it can use the native SQL of the underlying data store FeatureServer\SQLFormat\native. The default is FeatureServer\SQLFormat\none, which means the sqlFormat depends on the useStandardizedQuery parameter. Note: The SQL format FeatureServer\SQLFormat\native is supported only when useStandardizedQuery [is set to false].

use​Standardized​Query

TODO

gdb​Version String?

the geodatabase version to query. This parameter applies only if the hasVersionedData property of the service and the isDataVersioned property of the layers queried are true. If gdbVersion is not specified, the query will apply to the published map’s version. Example: gdbVersion = "SDE.DEFAULT"

Returns

An Array of FeatureLayers.