Skip to content

Instantly share code, notes, and snippets.

@dkuppitz
Created January 18, 2017 15:37
Show Gist options
  • Save dkuppitz/3532ff1589e9f1791521e7bd403a6811 to your computer and use it in GitHub Desktop.
Save dkuppitz/3532ff1589e9f1791521e7bd403a6811 to your computer and use it in GitHub Desktop.
gremlin> g.V().order().by("name", {a, b -> println "$b compared to $a: ${b.compareToIgnoreCase(a)}"; b.compareToIgnoreCase(a)}).values("name")
marko compared to vadas: -9
vadas compared to lop: 10
marko compared to lop: 1
marko compared to josh: 3
lop compared to josh: 2
lop compared to ripple: -6
marko compared to ripple: -5
vadas compared to ripple: 4
marko compared to peter: -3
ripple compared to peter: 2
==>vadas
==>ripple
==>peter
==>marko
==>lop
==>josh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment