private fun createSubQuery(subQuery: NodeSubQuery, parentNodeDefinition: NodeDefinition, allNodes: SymbolicName, unwindCount: Int): StatementWithResultNodesAndNodes

Creates a SubQuery using a Cypher SubQuery Uses NodeSubQuery.onlyOnTypes to only fetch related nodes when necessary

Return

the generated statement, the result name and the name of a collection with all raw nodes

Parameters

subQuery

the SubQuery to convert

parentNodeDefinition

the definition of the nodes in allNodes

allNodes

the name of the collection containing all nodes

unwindCount

the nesting depth of allNodes