RelatedQueryParameters Class

ArcGISFeatureTable."> RelatedQueryParameters Class | ArcGISQtCpp
  • RelatedQueryParameters
  • class Esri::ArcGISRuntime::RelatedQueryParameters

    Parameters to perform a related query on an ArcGISFeatureTable. More...

    Header: #include <RelatedQueryParameters.h>
    Since: Esri::ArcGISRuntime 100.1

    Public Functions

    RelatedQueryParameters()
    RelatedQueryParameters(const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo)
    RelatedQueryParameters(const Esri::ArcGISRuntime::RelatedQueryParameters &other)
    RelatedQueryParameters(Esri::ArcGISRuntime::RelatedQueryParameters &&other)
    ~RelatedQueryParameters()
    void clear()
    bool isEmpty() const
    bool isReturnGeometry() const
    int maxFeatures() const
    QList<Esri::ArcGISRuntime::OrderBy> orderByFields() const
    Esri::ArcGISRuntime::RelationshipInfo relationshipInfo() const
    int resultOffset() const
    void setMaxFeatures(int maxFeatures)
    void setOrderByFields(const QList<Esri::ArcGISRuntime::OrderBy> &orderByFields)
    void setRelationshipInfo(const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo)
    void setResultOffset(int resultOffset)
    void setReturnGeometry(bool returnGeometry)
    void setWhereClause(const QString &whereClause)
    QString whereClause() const
    Esri::ArcGISRuntime::RelatedQueryParameters &operator=(const Esri::ArcGISRuntime::RelatedQueryParameters &other)
    Esri::ArcGISRuntime::RelatedQueryParameters &operator=(Esri::ArcGISRuntime::RelatedQueryParameters &&other)

    Detailed Description

    When querying related features, all participating tables must be included in the same Map or Scene, as either feature layers or non-spatial tables. The query that uses these parameters will load these related tables.

    RelatedQueryParameters lets you specify:

    • Details about the relationship to be queried.
    • A where clause used to filter features from the related table.
    • How to sort the results.
    • Whether to return geometry within the results.

    See also ArcGISFeatureTable::queryRelatedFeaturesAsync(ArcGISFeature) and ServiceFeatureTable::queryRelatedFeaturesAsync(ArcGISFeature).

    Member Function Documentation

    RelatedQueryParameters::RelatedQueryParameters()

    Default Constructor. Create an empty RelatedQueryParameters instance.

    [explicit] RelatedQueryParameters::RelatedQueryParameters(const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo)

    Creates related query parameters with the specified relationship information.

    • relationshipInfo - The relationship information between related tables.

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

    Copy constructor from other RelatedQueryParameters.

    RelatedQueryParameters::RelatedQueryParameters(Esri::ArcGISRuntime::RelatedQueryParameters &&other)

    Move constructor from other RelatedQueryParameters.

    RelatedQueryParameters::~RelatedQueryParameters()

    Destructor

    void RelatedQueryParameters::clear()

    Clears this RelatedQueryParameters, setting it to empty.

    bool RelatedQueryParameters::isEmpty() const

    Returns whether this RelatedQueryParameters is empty.

    bool RelatedQueryParameters::isReturnGeometry() const

    Returns 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.

    Default value is true.

    [since Esri::ArcGISRuntime 100.3] int RelatedQueryParameters::maxFeatures() const

    Returns 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 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 resultOffset.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also setMaxFeatures().

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

    Returns the list of OrderBy objects which indicate how to sort the results.

    Results can be sorted by one or more fields. Each order by 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 setOrderByFields() and OrderBy.

    Esri::ArcGISRuntime::RelationshipInfo RelatedQueryParameters::relationshipInfo() const

    Returns the RelationshipInfo used to define the tables to use for this query.

    See also setRelationshipInfo().

    [since Esri::ArcGISRuntime 100.3] int RelatedQueryParameters::resultOffset() const

    Returns 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.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also setResultOffset().

    [since Esri::ArcGISRuntime 100.3] void RelatedQueryParameters::setMaxFeatures(int maxFeatures)

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

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

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also maxFeatures().

    void RelatedQueryParameters::setOrderByFields(const QList<Esri::ArcGISRuntime::OrderBy> &orderByFields)

    Sets the list of OrderBy objects which indicate how to sort the results to orderByFields.

    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 RelatedQueryParameters::setRelationshipInfo(const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo)

    Sets the RelationshipInfo used to define the tables to use for this query to relationshipInfo.

    See also relationshipInfo().

    [since Esri::ArcGISRuntime 100.3] void RelatedQueryParameters::setResultOffset(int resultOffset)

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

    When providing a result offset to support paging of results, you must also set a maximum features value. 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 RelatedQueryParameters::setReturnGeometry(bool returnGeometry)

    Sets whether geometries will be returned in the related feature query result to returnGeometry.

    Set to true to return related feature geometries.

    See also isReturnGeometry().

    void RelatedQueryParameters::setWhereClause(const QString &whereClause)

    Sets the whereClause to apply to the related table to whereClause.

    See also whereClause().

    QString RelatedQueryParameters::whereClause() const

    Returns the where clause to apply to the destination table.

    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 FieldType::GlobalId or FieldType::GUID 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.

    See also setWhereClause().

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

    Assignment operator from other RelatedQueryParameters.

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

    Move operator from other RelatedQueryParameters.

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