g=TinkerFactory.createModern().traversal()
g.V().as('start').values('name').as('person').select('start').out('created').values('name').as('software').select('person','software').map{it.get().get('person')+it.get().get('software')}
Output:
==>markolop
==>joshripple
==>joshlop
==>peterlop
Is it possible to write the same query without using lambda?
gremlin> g.V().as('person').out('created').values('name').map(union(select('person').by('name'), identity()).fold())==>[marko,lop]==>[josh,ripple]==>[josh,lop]==>[peter,lop]
--
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/ee0d07cf-6780-4f87-8b4e-2bae9327dbaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seUr%3D3g5JSaxvp%2BwQVEqJLATYsB4fPDHcjQqBvT9pL5t2w%40mail.gmail.com.
I hope we can think through how to get that types of operations into the language (i.e. simple transformative functions, like string concat). That's one of missing pieces of Gremlin still.
String concatenations are not supported, but you could use arrays/lists.gremlin> g.V().as('person').out('created').values('name').map(union(select('person').by('name'), identity()).fold())==>[marko,lop]==>[josh,ripple]==>[josh,lop]==>[peter,lop]Cheers,Daniel
On Tue, Mar 12, 2019 at 4:12 AM Udit Sharma <ushar...@gmail.com> wrote:
Hi,--I am executing the following query for concatenating two property values.g=TinkerFactory.createModern().traversal()
g.V().as('start').values('name').as('person').select('start').out('created').values('name').as('software').select('person','software').map{it.get().get('person')+it.get().get('software')}
Output:
==>markolop
==>joshripple
==>joshlop
==>peterlop
Is it possible to write the same query without using lambda?
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 gremli...@googlegroups.com.
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/1621644e-0faf-4fe7-94a0-a3661d610d67%40googlegroups.com.