private fun createSubReturnStatement(builder: StatementBuilder.OngoingReadingWithoutWhere, resultNodesCollected: SymbolicName, nodesCollected: SymbolicName, parentNodeId: Expression, totalCount: SymbolicName?): StatementWithResultNodesAndNodes
Creates the return statement and builds the query. If totalCount is not fetched, null is set as value for totalCount Must only be used for SubQueries and not for the root query
Return
the generated statement, the result name and the name of a collection with all raw nodes
Parameters
builder
ongoing statement builder
resultNodesCollected
name for the variable containing a collection of all result nodes
nodesCollected
name for the variable containing all raw nodes, used for SubQueries
parentNodeId
statement for parent node id, set to Cypher.literalNull() if null
totalCount
name for the variable under which totalCount should be saved