class NodeQuery(definition: NodeDefinition, val options: NodeQueryOptions, entries: List<NodeQueryEntry<*>>) : QueryBase<NodeQuery>

Defines a query which fetches Nodes of type definition

Parameters

definition

defines which type of Node is fetched

options

options for the query, e.g. pagination

entries

parts of the query to execute with this query

Constructors

Link copied to clipboard
constructor(definition: NodeDefinition, options: NodeQueryOptions, entries: List<NodeQueryEntry<*>>)

Properties

Link copied to clipboard
val cost: Int

The cost of this NodeQueryPart

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Lookup to get an entry efficiently by resultKeyPath Each group contains all entries under a specific resultKey Necessary as resultKey may not be unique, as only NodeQueryEntry.resultKeyPath with any element of NodeQueryEntry.onlyOnTypes must be unique

Link copied to clipboard

Functions

Link copied to clipboard

Checks if any part of this node query affects the given node

Link copied to clipboard
open override fun copyWithEntries(entries: List<NodeQueryEntry<*>>): NodeQuery

Copies this query and sets the entries to the given entries

Link copied to clipboard
fun getEntry(resultKey: String, nodeDefinitionProvider: () -> NodeDefinition): NodeQueryEntry<*>

Gets an entry by NodeQueryEntry.resultKeyPath. As multiple subqueries can use the same resultKeyPath if they use different NodeQueryEntry.onlyOnTypes, a list of NodeDefinitions may be necessary to get the correct subquery. This is provided as provider as evaluation is expensive and only necessary in few cases