A custom id can be supplied to a new vertex at the Gremlin Console as follows:
gremlin> g.addV('person').property(id, 1234).next()
==>v[1234]
In the Java client it can be done as follows:
graph.addVertex(T.id, customId);
(Where T is org.apache.tinkerpop.gremlin.structure.T)
Is there an equivalent of T.id for gremlin_python to facilitate the above form?
Many thanks.
There is a T enum for Python at gremlin_python.process.traversal.T (source code)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With