QueryParameters QML Type

  • Esri.ArcGISRuntime
  • QueryParameters
  • Parameters to perform a query on a dataset. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0
    Inherits:

    Object

    Properties

    Signals

    Detailed Description

    These parameters provide attribute, spatial, and temporal criteria that you can use to filter features. You can define attribute criteria using a standard SQL expression based on the available attribute fields, spatial criteria using a geometry and a spatial relationship (such as within, contains, intersect), or temporal filters using a single date/time, or a range. You can also control how the results are sorted and whether to return geometry.

    In addition to querying features in a table, you can also use these parameters to count specific features, calculate the extent of features, select features in layers, and populate service-based tables. If the query method produces a set of features, they are returned in a FeatureQueryResult.

    Different query parameter objects are available to query data sources such as related features (RelatedQueryParameters), statistical information (StatisticsQueryParameters), and portals (PortalQueryParameters). Specialized query parameters also exist for working with utility networks and routing.

    See also FeatureTable::queryFeatures(QueryParameters), FeatureTable::queryFeatureCount(QueryParameters), FeatureTable::queryExtent(QueryParameters), FeatureLayer::selectFeatures(), and ServiceFeatureTable::populateFromService().

    Property Documentation

    [default] geometry : Geometry

    The geometry used to filter the results.

    The geometry that (along with the spatialRelationship) defines features to be included in the query.


    maxAllowableOffset : double

    The maximum allowable offset used for generalizing geometries returned by the query operation.

    This is expressed in units of outSpatialReference.

    The default value is 0.0.


    maxFeatures : int

    The maximum number of features the query should return.

    For consistent ordering of results when using pagination, provide a value for orderByFields. Note that if you provide a maximum features value to support paging of results, you must also set a resultOffset value. Otherwise, the result may contain local features in place of server features if they satisfy the query. To ensure strict paging of server features, specify both maximum features and resultOffset.

    If 0, then there is no limit set on the number of features.

    The default value is 0.


    objectIds : list<string>

    The list of object IDs of the features to be queried.

    Only features with these object IDs, a unique identifier within the feature set, will be considered as result candidates.

    Note: The underlying property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

    Note: objectIds and objectIdsAsInts can be used interchangeably. Both reference the same underlying API property.

    See also objectIdsAsInts.


    [since Esri.ArcGISRuntime 100.3] objectIdsAsInts : list<int>

    The same as objectIds but represented as an integer types (read-only).

    Note: The underlying property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

    Note: objectIdsAsInts and objectIds can be used interchangeably. Both reference the same underlying API property.

    This property was introduced in Esri.ArcGISRuntime 100.3.


    [default] orderByFields : list<OrderBy>

    The fields by which query results will be ordered.

    Results can be sorted by one or more fields. Each OrderBy instance includes a field name and whether to sort by that field in ascending or descending order. If a service-based table is being queried it must support advanced queries.

    See also OrderBy.


    [default] outSpatialReference : SpatialReference

    The spatial reference of the feature geometry in the result.

    If not specified, geometries are returned in the spatial reference of the service.


    [since Esri.ArcGISRuntime 100.3] resultOffset : int

    The starting offset of results to fetch. This is useful for paging through results.

    For consistent ordering of results when using pagination, you should also provide a value for the orderByFields. Note that if you provide a result offset to support paging of results, you must also set a maxFeatures value. Otherwise, the result offset is ignored.

    The default value is 0.

    This property was introduced in Esri.ArcGISRuntime 100.3.


    returnGeometry : bool

    true if geometry values are returned in the results, otherwise false.

    This is needed when you want to display the features on a map or a scene. When querying non-spatial data, results do not include geometry.


    spatialRelationship : Enums.SpatialRelationship

    The spatial relationship that (along with the geometry) defines features to be included in the query.

    The default spatial relationship is Enums.SpatialRelationshipIntersects.

    See also Enums.SpatialRelationship.


    [default, since Esri.ArcGISRuntime 100.3] timeExtent : TimeExtent

    A span of time used to query features in a time-aware feature layer.

    You can apply a temporal filter on any FeatureLayer that supports time filtering (FeatureLayer::supportsTimeFiltering). Set the TimeExtent::startTime and TimeExtent::endTime to query features across a span of time. A single point in time can be queried by setting them to the same time value.

    By default, this value is null and no time criteria is applied by the query.

    This property was introduced in Esri.ArcGISRuntime 100.3.


    whereClause : string

    The attribute expression that defines features to be included in the query.

    The where clause should follow standard SQL syntax similar to that discussed in the document SQL reference for query expressions used in ArcGIS.

    If the where clause includes dates, they must be correctly formatted based on the geodatabase datasource used in the service. Refer to Dates and time for date formats expected by different data sources.

    ArcGISFeatureTable objects expect that any Enums.FieldTypeGlobalId or Enums.FieldTypeGUID parameters in the where clause are formatted as: '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'. All characters are uppercase, wrapped in curly braces and surrounded by single quotes.

    If the where clause is used to populate a OgcFeatureCollectionTable, you can use a CQL2-TEXT or CQL2-JSON string as defined in the document OGC API - Features - Part3.


    Signal Documentation

    geometryChanged()

    Emitted when the geometry property changes.

    Note: The corresponding handler is onGeometryChanged.


    maxAllowableOffsetChanged()

    Emitted when the maxAllowableOffset property changes.

    Note: The corresponding handler is onMaxAllowableOffsetChanged.


    maxFeaturesChanged()

    Emitted when the maxFeatures property changes.

    Note: The corresponding handler is onMaxFeaturesChanged.


    objectIdsAsIntsChanged()

    Emitted when the objectIdsAsInts property changes.

    Note: The corresponding handler is onObjectIdsAsIntsChanged.


    objectIdsChanged()

    Emitted when the objectIds property changes.

    Note: The corresponding handler is onObjectIdsChanged.


    [since Esri.ArcGISRuntime 100.1] orderByFieldsChanged()

    Emitted when the orderByFields property changes.

    Note: The corresponding handler is onOrderByFieldsChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.1.


    outSpatialReferenceChanged()

    Emitted when the outSpatialReference property changes.

    Note: The corresponding handler is onOutSpatialReferenceChanged.


    [since Esri.ArcGISRuntime 100.3] resultOffsetChanged()

    Emitted when the resultOffset property changes.

    Note: The corresponding handler is onResultOffsetChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.3.


    returnGeometryChanged()

    Emitted when the returnGeometry property changes.

    Note: The corresponding handler is onReturnGeometryChanged.


    spatialRelationshipChanged()

    Emitted when the spatialRelationship property changes.

    Note: The corresponding handler is onSpatialRelationshipChanged.


    [since Esri.ArcGISRuntime 100.3] timeExtentChanged()

    Emitted when the timeExtent property changes.

    Note: The corresponding handler is onTimeExtentChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.3.


    whereClauseChanged()

    Emitted when the whereClause property changes.

    Note: The corresponding handler is onWhereClauseChanged.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.