graph=TinkerGraph.open() | |
g=graph.traversal() | |
g.addV('airport').property('code','AUS').as('aus'). | |
addV('airport').property('code','DFW').as('dfw'). | |
addV('airport').property('code','LAX').as('lax'). | |
addV('airport').property('code','JFK').as('jfk'). | |
addV('airport').property('code','ATL').as('atl'). | |
addE('route').from('aus').to('dfw'). | |
addE('route').from('aus').to('atl'). | |
addE('route').from('atl').to('dfw'). | |
addE('route').from('atl').to('jfk'). | |
addE('route').from('dfw').to('jfk'). | |
addE('route').from('dfw').to('lax'). | |
addE('route').from('lax').to('jfk'). | |
addE('route').from('lax').to('aus'). | |
addE('route').from('lax').to('dfw') |
gremlin> g = TinkerGraph.open().traversal()==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]gremlin> g.addV('fruit').property('name','apple')==>v[0]gremlin> g.addV('fruit').property('name','orange')==>v[2]gremlin> g.addV('person').property('name','john').property('like','apple')==>v[4]gremlin> g.addV('person').property('name','jane').property('like','orange')==>v[7]gremlin> g.V().hasLabel('person').as('p').V().hasLabel('fruit').as('f').where('p', eq('f')).by('like').by('name').addE('likes').from('p')==>e[10][4-likes->0]==>e[11][7-likes->2]gremlin> g.V().hasLabel('person').outE().inV().path().by('name').by(label)==>[john,likes,apple]==>[jane,likes,orange]
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/87425f2b-c7d7-4a7c-8302-22fc946413d6%40googlegroups.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.
SUPER-AWESOME!!!!
Thank you so much!
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/87425f2b-c7d7-4a7c-8302-22fc946413d6%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Gremlin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gremlin-users/heIgIX6ZveA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seXNKdfHc49XLLQQS%3D%3DDDBtFE_rYzPOoAC6dg-nG%2BQXWnA%40mail.gmail.com.
('g','Multiple properties exist for the provided key, use Vertex.properties(like)')
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
gremlin> g.V().hasLabel('person').as('p').
......1> values('like').as('fn').......2> V().hasLabel('fruit').as('f').......3> where('fn', eq('f')).......4> by().......5> by('name').......6> addE('likes').......7> from('p')==>e[11][4-likes->0]==>e[12][4-likes->2]==>e[13][8-likes->2]
gremlin> g.V().hasLabel('person').outE().inV().path().by('name').by(label)==>[john,likes,apple]
==>[john,likes,orange]==>[jane,likes,orange]
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/36237674-c1b2-4bf7-a799-c5402fbec9e0%40googlegroups.com.
Amazing how powerful!!!
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/36237674-c1b2-4bf7-a799-c5402fbec9e0%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Gremlin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gremlin-users/heIgIX6ZveA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seVbCf8Y2M4RuCESkXokX%3DHsA6m9a%3D0t2ONeWj1easQ13g%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
g.V().hasLabel('person').as('p').V().hasLabel('fruit').as('f').where('p', eq('f')).by('like').by('name').addE('likes').from('p').
property('test', select('p').by('aPersonProperty'))
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/8856b028-047a-419d-a10f-ef2b86992eac%40googlegroups.com.
by(), from() and to() are modulators that interpret a String as a reference to a named step
g.V().hasLabel('observation').group().by('type').by(valueMap().fold()).unfold().select(values).as('v').addV('object').as('o').select('v').unfold().unfold().as('kv').select('o').property(set,select('kv').select(keys).choose(__.is('type'), constant('name')),select('kv').select(values).unfold())
gremlin> g.V().hasLabel('object').valueMap()==>[obs_date:[2018-01-15],country:[spain],color:[orange],name:[orange]]==>[obs_date:[2018-01-14,2018-01-15],color:[green],name:[apple]]
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/8494054b-fccf-4232-8ce7-b6fcb463d6d5%40googlegroups.com.
['Vertex:', {'id': 'b6b09711-b7b4-e14a-98ae-5a60560640d9', 'label': 'object', 'properties': {'color': 'orange', 'country': 'spain', 'name': 'orange', 'obs_date': '2018-01-15'}}, 'Vertex:', {'id': 'b6b09711-b7b4-e14a-98ae-5a60560640d9', 'label': 'object', 'properties': {'color': 'orange', 'country': 'spain', 'name': 'orange', 'obs_date': '2018-01-15'}}, 'Vertex:', {'id': 'b6b09711-b7b4-e14a-98ae-5a60560640d9', 'label': 'object', 'properties': {'color': 'orange', 'country': 'spain', 'name': 'orange', 'obs_date': '2018-01-15'}}, 'Vertex:', {'id': 'b6b09711-b7b4-e14a-98ae-5a60560640d9', 'label': 'object', 'properties': {'color': 'orange', 'country': 'spain', 'name': 'orange', 'obs_date': '2018-01-15'}}]
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/d676cd95-a418-47cc-9ade-6baa2055e25d%40googlegroups.com.
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/9b4990aa-9bf9-4f59-b1f0-9173c579a48e%40googlegroups.com.
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/fe36a8d2-7ba2-47b9-b1db-5a4ff98d34e1%40googlegroups.com.
Ah! Thank you for the clarification!
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/fe36a8d2-7ba2-47b9-b1db-5a4ff98d34e1%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Gremlin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gremlin-users/heIgIX6ZveA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seVsi_CfW4BwyoVHa32gzPcjXpdXQSKqofmux6yJ0-12aQ%40mail.gmail.com.