Return result count along with results #720
Unanswered
sooneel333
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to write the following Gremlin query in Gremlinq to return the results along with the result count in single query:
g.V().hasLabel("person").fold().project("users","userCount").by(range(local, 0, 2)).by(count(local))
In Gremlin, it will result such as:
{
users: [
{
userId: 1,
job:'developer'
},
{
userId: 2,
job:'teacher'
},
{
userId: 3,
job:'scientist'
}
],
userCount: 239
}
Can you please help me write the Gremlinq query for this?
Beta Was this translation helpful? Give feedback.
All reactions