Skip to main content
Version: 2.5

RootQueryPart

The first part of a Query. It breaks down the starting point of the query.

Hierarchy

Index

Properties

dataType

dataType: string

The tag of the Data Type of the instance(s) determining the starting point of the query. It is the tag of the Data Type provided to Query.instancesOf(), or the Data Type of the root instance provided to Query.from()

filter

filter: ParsedPredicate[][]

Specify if the instances obtained by following the relation should satisfy some condition See ParsedPredicate

inheritance

inheritance: boolean

Specifies whether instances of the data types inheriting from the root data type should be included in the query or not. It is always false if root is specified.

limit

limit: number

Limits the number of results retrieved by the query.

next

next: QueryPart[]

Returns the remaining QueryParts of the query, empty if no QueryParts are left.

offset

offset: number

Skips a specified number of results retrieved by the query.

optional

optional: boolean

Determines whether the relationship this part specifies is optional or not to traverse. If true, result tuples may have a null if this relationship can not be followed from some data objects. If false, all result tuples must contain this relationship.

recursive

recursive: false | EXCLUDE_SELF | INCLUDE_SELF

Determines whether the relationship should be traversed recursively and whether the starting object should be included. false: Traverse the relationship once. 'EXCLUDE_SELF': Traverse the relationship recursively, excluding the starting object. 'INCLUDE_SELF': Traverse the relationship recursively, including the starting object.

relation

relation: Relation<any, any>

Specifies a relationship to traverse in the query.

returned

returned: boolean

Determines whether the related objects should be included in the result tuples. If true, related objects will be included. If false, the related objects are not included. This does not impact whether the relationship is optional to be traversed.

optionalroot

root?: string

The tag of the starting point of a query built using Query.from() It is the tag of the instance where the first relation followed using Query.follow() starts from. For queries on instances of a data type, started with Query.instancesOf(), this will be null.

optionalsort

sort?: { order: Order; property: Property<any> }

Set a sorting order on the result tuples according to the related objects. It will sort using native order of the type of the property. For multiple parts with sort information, the latest part will prevail.


Type declaration