Parameters to perform a query on a dataset. 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.
The maximum number of features the query should return. For consistent ordering of results when using pagination, provide a value for QueryParameters.orderByFields. Note that if you provide a maximum features value to support paging of results, you must also set a QueryParameters.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 QueryParameters.resultOffset.
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.
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 QueryParameters.orderByFields. Note that if you provide a result offset to support paging of results, you must also set a QueryParameters.maxFeatures value. Otherwise, the result offset is ignored.
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.
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 https://pro.arcgis.com/en/pro-app/latest/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#GUID-940733A1-D6D1-4200-B290-24CA2E1056D4