QueryParameters Class

  • QueryParameters
  • class Esri::ArcGISRuntime::QueryParameters

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

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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

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

    Detailed Description

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

    Member Function Documentation

    QueryParameters::QueryParameters(Esri::ArcGISRuntime::QueryParameters &&other)

    Move constructor from other QueryParameters.

    QueryParameters::QueryParameters(const Esri::ArcGISRuntime::QueryParameters &other)

    Copy constructor from other QueryParameters.

    QueryParameters::QueryParameters()

    Default Constructor. Create an empty QueryParameters instance.

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

    Move operator from other QueryParameters.

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

    Assignment operator from other QueryParameters.

    QueryParameters::~QueryParameters()

    Destructor

    void QueryParameters::clear()

    Clears this QueryParameters and sets back to empty.

    Esri::ArcGISRuntime::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.

    The default value is 0.0.

    See also setMaxAllowableOffset() and maxAllowableOffset.

    int QueryParameters::maxFeatures() const

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

    The default value is 0.

    See also setMaxFeatures().

    QList<qint64> QueryParameters::objectIds() const

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

    See also setObjectIds.

    QList<Esri::ArcGISRuntime::OrderBy> QueryParameters::orderByFields() const

    Returns the sort order of result.

    See also setOrderByFields.

    Esri::ArcGISRuntime::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.

    The default value is 0.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also setResultOffset().

    void QueryParameters::setGeometry(const Esri::ArcGISRuntime::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.

    The default value is 0.0.

    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.

    The default value is 0.

    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<Esri::ArcGISRuntime::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 Esri::ArcGISRuntime::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.

    The default value is 0.

    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(Esri::ArcGISRuntime::SpatialRelationship relationship)

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

    The default value is SpatialRelationship::Intersects.

    See also spatialRelationship().

    void QueryParameters::setTimeExtent(const Esri::ArcGISRuntime::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)

    The whereClause of the query.

    See also whereClause().

    Esri::ArcGISRuntime::SpatialRelationship QueryParameters::spatialRelationship() const

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

    The default value is SpatialRelationship::Intersects.

    See also setSpatialRelationship().

    Esri::ArcGISRuntime::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.

    The string that is used as the QueryParameters::whereClause should follow standard SQL syntax similar to what is discussed in the document SQL reference for query expressions used in ArcGIS.

    If the string that is used as the whereClause is used by the OgcFeatureCollectionTable::populateFromService(QueryParameters, bool, QStringList) method, you can put any CQL2-TEXT or CQL2-JSON string as defined in the document OGC API - Features - Part3. Note: CQL-TEXT and CQL-JSON string are not supported with ArcGISFeatureTable objects.

    See also setWhereClause().

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