layout: default title: RelationshipQuery parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Objects

RelationshipQuery Class

This class defines parameters for executing queries for related records from a layer. Once a RelationshipQuery
object’s properties are defined, it can then be passed into the query.executeRelationshipQuery() and
FeatureLayer.queryRelatedFeatures() methods, which will return FeatureSets grouped by source layer/table objectIds.
ArcGIS Maps SDK for JavaScript

public class RelationshipQuery

Inheritance System.Object 🡒 RelationshipQuery

Properties

RelationshipQuery.CacheHint Property

Indicates if the service should cache the relationship query results. It only applies if the layer’s
capabilities.queryRelated.supportsCacheHint is set to true. Use only for queries that have the same parameters
every time the app is used.

public System.Nullable<bool> CacheHint { get; set; }

Property Value

System.Nullable<System.Boolean>

RelationshipQuery.GdbVersion Property

Specify the geodatabase version to query.

public string? GdbVersion { get; set; }

Property Value

System.String

RelationshipQuery.GeometryPrecision Property

Specify the number of decimal places for the geometries returned by the query operation.

public System.Nullable<double> GeometryPrecision { get; set; }

Property Value

System.Nullable<System.Double>

RelationshipQuery.HistoricMoment Property

The historic moment to query. This parameter applies only if the supportsHistoricMoment on FeatureLayer property of
the layer is set to true.

public System.Nullable<System.DateTime> HistoricMoment { get; set; }

Property Value

System.Nullable<System.DateTime>

RelationshipQuery.MaxAllowableOffset Property

The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the
units of outSpatialReference. If outSpatialReference is not defined, the spatialReference of the view is used.

public System.Nullable<double> MaxAllowableOffset { get; set; }

Property Value

System.Nullable<System.Double>

RelationshipQuery.Num Property

The number of features to retrieve. This option should be used in conjunction with the start property. Use this to
implement paging (i.e. to retrieve “pages” of results when querying).
If not provided, but an instance of Query has a start property, then the default value of num is 10. If neither num
nor start properties are provided, then the default value of num is equal to the maxRecordCount of the service,
which can be found at the REST endpoint of the FeatureLayer.

public System.Nullable<int> Num { get; set; }

Property Value

System.Nullable<System.Int32>

RelationshipQuery.ObjectIds Property

An array of objectIds for the features in the layer/table being queried.

public System.Collections.Generic.IEnumerable<int>? ObjectIds { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.Int32>

RelationshipQuery.OrderByFields Property

One or more field names used to order the query results. Specify ASC (ascending) or DESC (descending) after the
field name to control the order. The default order is ASC.

public System.Collections.Generic.IEnumerable<string>? OrderByFields { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.String>

Remarks

Known Limitations

  • If querying a MapImageLayer, then supportsAdvancedQueries must be true on the service.
  • For FeatureLayer, FeatureLayer.capabilities.queryRelated.supportsOrderBy must be true.

RelationshipQuery.OutFields Property

Attribute fields to include in the FeatureSet. Fields must exist in the map layer. You must list actual field names
rather than the alias names. You are, however, able to use the alias names when you display the results.
When specifying the output fields, you should limit the fields to only those you expect to use in the query or the
results. The fewer fields you include, the faster the response will be.
Each query must have access to the Shape and ObjectId fields for a layer. However, your list of fields does not
need to include these two fields.

public System.Collections.Generic.IEnumerable<string>? OutFields { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.String>

RelationshipQuery.OutSpatialReference Property

The spatial reference for the returned geometry. If outSpatialReference is not defined, the spatialReference of the
view is used.

public dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? OutSpatialReference { get; set; }

Property Value

SpatialReference

RelationshipQuery.RelationshipId Property

The ID of the relationship to be queried. The ids for the relationships the table or layer participates in are
listed in the ArcGIS Services directory. The ID of the relationship to be queried. The relationships that this
layer/table participates in are included in the Feature Service Layer resource response. Records in tables/layers
corresponding to the related table/layer of the relationship are queried.

public System.Nullable<int> RelationshipId { get; set; }

Property Value

System.Nullable<System.Int32>

RelationshipQuery.ReturnGeometry Property

If true, each feature in the FeatureSet includes the geometry. Set to false (default) if you do not plan to include
highlighted features on a map since the geometry makes up a significant portion of the response.

public System.Nullable<bool> ReturnGeometry { get; set; }

Property Value

System.Nullable<System.Boolean>

RelationshipQuery.ReturnM Property

If true, and returnGeometry is true, then m-values are included in the geometry.

public System.Nullable<bool> ReturnM { get; set; }

Property Value

System.Nullable<System.Boolean>

RelationshipQuery.ReturnZ Property

If true, and returnGeometry is true, then z-values are included in the geometry.

public System.Nullable<bool> ReturnZ { get; set; }

Property Value

System.Nullable<System.Boolean>

RelationshipQuery.Start Property

The zero-based index indicating where to begin retrieving features. This property should be used in conjunction
with num. Use this to implement paging and retrieve “pages” of results when querying. Features are sorted ascending
by object ID by default.

public System.Nullable<int> Start { get; set; }

Property Value

System.Nullable<System.Int32>

RelationshipQuery.Where Property

The definition expression to be applied to the related table or layer. Only records in the list of objectIds that
satisfy the definition expression are queried for related records.

public string? Where { get; set; }

Property Value

System.String