Skip to main content
Version: 2.9

RootQueryPart

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

Extends

Properties

PropertyTypeDescriptionInherited from
dataTypestringThe 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()-
filterParsedPredicate[][]Specify if the instances obtained by following the relation should satisfy some condition See ParsedPredicateQueryPart.filter
inheritancebooleanSpecifies 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.-
limitnumberLimits the number of results retrieved by the query.-
nextQueryPart[]Returns the remaining QueryParts of the query, empty if no QueryParts are left.QueryPart.next
offsetnumberSkips a specified number of results retrieved by the query.-
optionalbooleanDetermines 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.QueryPart.optional
recursivefalse | "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.QueryPart.recursive
relationRelation<any, any>Specifies a relationship to traverse in the query.QueryPart.relation
returnedbooleanDetermines 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.QueryPart.returned
root?stringThe 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.-
sort?objectSet 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.QueryPart.sort
sort.orderOrder--
sort.propertyProperty<any>--