Skip To Content ArcGIS for Developers Sign In Dashboard

QueryParameters Class

(Esri::ArcGISRuntime::QueryParameters)

Contains parameters for a query for features. More...

Header: #include <QueryParameters>
Since: Esri::ArcGISRuntime 100.0

Public Functions

QueryParameters()
QueryParameters(const QueryParameters &other)
QueryParameters(QueryParameters &&other)
~QueryParameters()
void clear()
Geometry geometry() const
bool isEmpty() const
bool isReturnGeometry() const
double maxAllowableOffset() const
int maxFeatures() const
QList<qint64> objectIds() const
QList<OrderBy> orderByFields() const
SpatialReference outSpatialReference() const
int resultOffset() const
void setGeometry(const Geometry &geometry)
void setMaxAllowableOffset(double maxAllowableOffset)
void setMaxFeatures(int maxFeatures)
void setObjectIds(const QList<qint64> &objectIds)
void setOrderByFields(const QList<OrderBy> &orderByFields)
void setOutSpatialReference(const SpatialReference &spatialReference)
void setResultOffset(int resultOffset)
void setReturnGeometry(bool returnGeometry)
void setSpatialRelationship(SpatialRelationship relationship)
void setTimeExtent(const TimeExtent &timeExtent)
void setWhereClause(const QString &whereClause)
SpatialRelationship spatialRelationship() const
TimeExtent timeExtent() const
QString whereClause() const
QueryParameters &operator=(const QueryParameters &other)
QueryParameters &operator=(QueryParameters &&other)

Detailed Description

Contains parameters for a query for features.

Queries can find features based on object ID, a geometry filter, a SQL WHERE clause, and a time extent.

Member Function Documentation

QueryParameters::QueryParameters()

Default Constructor. Create an empty QueryParameters instance.

QueryParameters::QueryParameters(const QueryParameters &other)

Copy constructor from other QueryParameters.

QueryParameters::QueryParameters(QueryParameters &&other)

Move constructor from other QueryParameters.

QueryParameters::~QueryParameters()

Destructor

void QueryParameters::clear()

Clears this QueryParameters and sets back to empty.

Geometry QueryParameters::geometry() const

Returns the geometry to use as a filter.

See also setGeometry().

bool QueryParameters::isEmpty() const

Returns whether this QueryParameters is empty.

bool QueryParameters::isReturnGeometry() const

Returns whether geometries are returned in the result.

double QueryParameters::maxAllowableOffset() const

Returns the maximum allowable offset to be used for the query.

See also setMaxAllowableOffset() and maxAllowableOffset.

int QueryParameters::maxFeatures() const

Returns the maximum number of features to be included in the result.

See also setMaxFeatures().

QList<qint64> QueryParameters::objectIds() const

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

See also setObjectIds.

QList<OrderBy> QueryParameters::orderByFields() const

Returns the sort order of result.

See also setOrderByFields.

SpatialReference QueryParameters::outSpatialReference() const

Returns the spatial reference of the feature geometry in the result.

See also setOutSpatialReference().

int QueryParameters::resultOffset() const

Returns the starting offset of results to fetch in the query.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also setResultOffset().

void QueryParameters::setGeometry(const Geometry &geometry)

Sets the geometry to use as a filter.

See also geometry().

void QueryParameters::setMaxAllowableOffset(double maxAllowableOffset)

Sets the maximum allowable offset, maxAllowableOffset, to be used for the query.

The maximum allowable offset is used for generalizing geometries returned by the query operation. It is expressed in the units of outSpatialReference.

See also maxAllowableOffset().

void QueryParameters::setMaxFeatures(int maxFeatures)

Sets the maximum number of features, maxFeatures, to be included in the result.

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

See also maxFeatures().

void QueryParameters::setObjectIds(const QList<qint64> &objectIds)

Sets the objectIds to filter for the query operation.

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

See also objectIds().

void QueryParameters::setOrderByFields(const QList<OrderBy> &orderByFields)

Sets the orderByFields to be applied to the query operation.

Results can be sorted on one or more fields. Each OrderBy instance includes a field name and whether to sort by that field in ascending or descending order.

See also orderByFields() and OrderBy.

void QueryParameters::setOutSpatialReference(const SpatialReference &spatialReference)

Sets the spatialReference to be applied to the returned features.

See also outSpatialReference().

void QueryParameters::setResultOffset(int resultOffset)

Sets the starting offset of results, resultOffset, to fetch in the query.

When providing a result offset to support paging of results, a maximum features value must be set. If the result offset is set, but the maximum features value is not, the offset is ignored. For consistent ordering of the results when using pagination, the order by fields must be set using setOrderByFields.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also resultOffset().

void QueryParameters::setReturnGeometry(bool returnGeometry)

Sets whether geometries will be returned in the feature result.

  • returnGeometry - Whether to return feature geometries.

See also isReturnGeometry().

void QueryParameters::setSpatialRelationship(SpatialRelationship relationship)

Sets the spatial relationship to use when applying the geometry filter.

See also spatialRelationship().

void QueryParameters::setTimeExtent(const TimeExtent &timeExtent)

Sets the time extent of the query to timeExtent.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also timeExtent().

void QueryParameters::setWhereClause(const QString &whereClause)

Sets the SQL whereClause to apply in the query.

See also whereClause().

SpatialRelationship QueryParameters::spatialRelationship() const

Returns the spatial relationship to use when applying the geometry filter.

See also setSpatialRelationship().

TimeExtent QueryParameters::timeExtent() const

Returns the time extent of the query.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also setTimeExtent().

QString QueryParameters::whereClause() const

Returns the SQL WHERE clause to apply in the query.

See also setWhereClause().

QueryParameters &QueryParameters::operator=(const QueryParameters &other)

Assignment operator from other QueryParameters.

QueryParameters &QueryParameters::operator=(QueryParameters &&other)

Move operator from other QueryParameters.


Feedback on this topic?