-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Labels
Description
CALL subquery (https://neo4j.com/docs/cypher-manual/current/clauses/call-subquery/) does not appear to be supported by ICypherFluentQuery. Furthermore, I can't find anyway to extend CypherFluentQuery to add support myself.
I can hack it by doing the following:
public static ICypherFluentQuery AggregationSubquery(this ICypherFluentQuery query)
{
return query
.Call("{") // Abuse CALL proc
.Unwind(Enumerable.Range(1, 5), "i")
.Create("(c:Clone)")
.Return<int>("count(c) AS numberOfClones }"); // Abuse RETURN clause
}
Is there an easier was to get this working?
Ideally, the API would be something that would take a lambda to build the subquery:
public static ICypherFluentQuery AggregationSubquery(this ICypherFluentQuery query)
{
return query
.Call(query => query
.Unwind(Enumerable.Range(1, 5), "i")
.Create("(c:Clone)")
. Return<int>("count(c) AS numberOfClones"));
}