Skip to content

Instantly share code, notes, and snippets.

@okram
Created July 18, 2014 22:41
Show Gist options
  • Save okram/2472f0aeced613f98132 to your computer and use it in GitHub Desktop.
Save okram/2472f0aeced613f98132 to your computer and use it in GitHub Desktop.
gremlin> g.V.filter{it.get().value('name').length() == 5}.out.name
==>lop
==>vadas
==>josh
==>lop
gremlin> g.V.filter{it.get().value('name').length() != 5}.in.name
==>marko
==>josh
==>peter
==>marko
==>josh
gremlin> g.V.ifThenElse({it.get().value('name').length() == 5}, g.of().out, g.of().in).name
==>lop
==>vadas
==>josh
==>marko
==>josh
==>peter
==>marko
==>josh
==>lop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment