Java GLV and Bindings

47 views
Skip to first unread message

Douglas Moore

unread,
Mar 17, 2018, 11:17:52 AM3/17/18
to Gremlin-users
I seen several Java examples of adding edges using the Java language variant of Gremlin (Hopefully I'm phrasing this correctly).
I've seen elsewhere the importance of using Binding -s in queries to avoid Groovy parse performance issues on the Gremlin server.
(e.g. Oracle query bind variables).

My question: With the Java GLV and possibly others, is it important to also include bindings, or does the GLV do this magic for us?

Thanks in advance.
- Douglas

Jean-Philippe B

unread,
Mar 17, 2018, 12:35:48 PM3/17/18
to gremli...@googlegroups.com
Hello,

Not sure sure about the Java GLV, but with Python GLV it's not magic,
you have to express them:

g.V().has('foo', 5) # no bindings
g.V().has('foo', ('val', 5)) # will generate a binding val=5

JP

Excerpts from Douglas Moore's message of March 17, 2018 4:17 pm:
> --
> You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/12d6fe55-12fa-484e-9afc-46b4c2577d3b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Stephen Mallette

unread,
Mar 19, 2018, 7:11:07 AM3/19/18
to Gremlin-users
At this time, bindings are only important to in two situations:

1. You send Gremlin scripts to the server
2. You send a remote traversal (i.e. bytecode) that contains a lambda

However, I think that in the future we will see some change there. I think that we need to introduce traversal caching (once converted from bytecode on the server) so that they do not have to be reconstructed on each request.

On Sat, Mar 17, 2018 at 12:35 PM, Jean-Philippe B <brau...@gmail.com> wrote:
Hello,

Not sure sure about the Java GLV, but with Python GLV it's not magic, you have to express them:

g.V().has('foo', 5) # no bindings
g.V().has('foo', ('val', 5)) # will generate a binding val=5

JP

Excerpts from Douglas Moore's message of March 17, 2018 4:17 pm:
I seen several Java examples of adding edges using the Java language variant of Gremlin (Hopefully I'm phrasing this correctly).
I've seen elsewhere the importance of using Binding -s in queries to avoid Groovy parse performance issues on the Gremlin server.
(e.g. Oracle query bind variables).

My question: With the Java GLV and possibly others, is it important to also include bindings, or does the GLV do this magic for us?

Thanks in advance.
- Douglas

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/1521304355.63u2d3eeo9.astroid%40gnion.none.
Reply all
Reply to author
Forward
0 new messages