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> g.addV().property('s',[1,2,3] as Set) | |
==>v[0] | |
gremlin> g.addV().property(set,'m',1).property(set,'m',2).property(set,'m',3) | |
==>v[2] | |
gremlin> g.V().map(union(id(), properties().count()).fold()) | |
==>[0,1] | |
==>[2,3] |
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> v = g.V(2).next() | |
==>v[2] | |
gremlin> g.V().is(v) | |
==>v[2] | |
gremlin> g.V().is(new ReferenceVertex(2, 'person')) | |
==>v[2] | |
gremlin> g.V(2).fold().is([new ReferenceVertex(2, 'person')]) | |
==>[v[2]] |
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> tx = g.tx() | |
==>org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTransaction@2a04ab05 | |
gremlin> gtx = tx.begin() | |
==>graphtraversalsource[emptygraph[empty], standard] | |
gremlin> gtx.V().count() | |
==>1 | |
gremlin> gtx.addV('person') | |
==>v[a8c21f2a-4a1a-6220-e702-ed65df4e290a] | |
gremlin> // wait 10 minutes | |
==>true |
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
g.withSack(0). | |
V().has('airport','code', frm). | |
repeat(__.outE('route').sack(sum).by('dist').inV().simplePath()). | |
until(__.has("code",to).or_().loops().is_(maxstops)). | |
has('code', to). | |
limit(sample). | |
order(). | |
by(__.sack()). | |
local(__.union(__.path().by('code').by('dist'),__.sack()).unfold().fold()). | |
limit(limit). |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
2002-05-30T02:00:00.000-07:00 | |
private static final DateTimeFormatter datetimeFormatter = new DateTimeFormatterBuilder() | |
.parseCaseInsensitive() | |
.append(ISO_LOCAL_DATE_TIME) | |
.optionalStart() | |
.appendOffset("+HHMMss", "Z") | |
.optionalEnd() | |
.optionalStart() | |
.appendOffset("+HH:MM:ss", "") |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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> g = TinkerGraph.open().traversal() | |
==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] | |
gremlin> g.addV().property(id, 'j1') | |
==>v[j1] | |
gremlin> g.addV().property(id, 'j2') | |
==>v[j2] | |
gremlin> g.addV().property(id, 'j3') | |
==>v[j3] | |
gremlin> m = ['j1': 'j2', 'j2': 'j3'] | |
==>j1=j2 |