use of org.vertexium.cypher.ast.model.CypherUnwindClause in project vertexium by visallo.
the class UnwindClauseExecutor method execute.
public VertexiumCypherScope execute(VertexiumCypherQueryContext ctx, List<CypherUnwindClause> clauses, VertexiumCypherScope scope) {
List<VertexiumCypherScope> allResults = new ArrayList<>();
VertexiumCypherScope accumulatorScope = scope;
for (CypherUnwindClause clause : clauses) {
List<VertexiumCypherScope.Item> clauseResults = new ArrayList<>();
accumulatorScope.stream().forEach(item -> {
List<VertexiumCypherScope.Item> items = execute(ctx, clause, item).collect(Collectors.toList());
clauseResults.addAll(items);
});
accumulatorScope = VertexiumCypherScope.newItemsScope(clauseResults, scope);
allResults.add(accumulatorScope);
}
return accumulatorScope;
}
Aggregations