Skip to main content
Version: 2.5

QueryPart

A part of a Query that specifies a relationship to traverse.

Hierarchy

Index

Properties

filter

filter: ParsedPredicate[][]

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

next

next: QueryPart[]

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

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.

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