Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use dubious magic to make more than one relationship slurp work

  • Loading branch information...
commit 85c2405fea5e7c1d202a3e0f5c68df66058b70d5 1 parent 86bd0dc
@mikesname authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 app/neo4j/gremlin.groovy
View
10 app/neo4j/gremlin.groovy
@@ -285,12 +285,10 @@ def query_exact_index_with_related(index_name, key, query_string, outRels, inRel
pipe = g.idx(index_name).get(key, Neo4jTokens.QUERY_HEADER + query_string)
if (outRels.size == 0 && inRels.size == 0)
return pipe
- pipe = pipe._()
- for (outr in outRels)
- pipe = pipe.copySplit(_(), _().out(outr))
- for (inr in inRels)
- pipe = pipe.copySplit(_(), _().in(inr))
- return pipe.exhaustMerge()
+ return pipe._().copySplit(*(
+ [_()] + outRels.collect{_().out(it)} + inRels.collect{_().in(it)}
+ )
+ ).exhaustMerge()
}
// Metadata
Please sign in to comment.
Something went wrong with that request. Please try again.