Last active
October 21, 2019 23:48
-
-
Save spmallette/c4b1feb1f63347dd22358157afc60ba2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gremlin.version() | |
g = TinkerGraph.open().traversal() | |
g.addV('bolt').property(set,'xyz','1-1-1').property(set,'xy','1-1').property('val', 12).as('A'). | |
addV('bolt').property(set,'xyz','2-1-2').property(set,'xyz','3-1-1').property(set,'xy','2-1').property(set, 'xy','3-1').property('val', 10).as('B'). | |
addV('bolt').property(set,'xyz','3-1-2').property(set,'xy','3-1').property('val', 15).as('C'). | |
addV('bolt').property(set,'xyz','2-1-1').property(set,'xy','2-1').property('val', 5).as('D'). | |
addE('link').from('A').to('B'). | |
addE('link').from('A').to('C'). | |
addE('link').from('A').to('D'). | |
addE('link').from('B').to('A'). | |
addE('link').from('C').to('A'). | |
addE('link').from('C').to('D'). | |
addE('link').from('D').to('A'). | |
addE('link').from('D').to('C').iterate() | |
g.V().has('xyz', '1-1-1').property(set, 'xy', '2-1').iterate() | |
g.V().has('xyz', '1-1-1').as('a'). | |
out(). | |
filter(map(values('xy').fold()).as('b'). | |
select('a').values('xy'). | |
where(within('b'))). | |
valueMap(true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment