private fun applyTotalCountIfRequired(options: NodeQueryOptions, builder: StatementBuilder.OrderableOngoingReadingAndWithWithoutWhere, allNodesCollected: SymbolicName, additionalNames: List<SymbolicName>): Pair<StatementBuilder.OrderableOngoingReadingAndWithWithoutWhere?, SymbolicName?>
Wraps the builder with applyTotalCount if required by the options
Return
the new builder and the name of the variable containing the total count
Parameters
options
the options for the query
builder
the builder to wrap
allNodesCollected
name of the collection containing all nodes
additionalNames
additional names which should be added to the with statement