Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

custom id in gremlin_python

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.

like image 953
Ned Lowe Avatar asked Nov 01 '25 07:11

Ned Lowe


1 Answers

There is a T enum for Python at gremlin_python.process.traversal.T (source code)

like image 199
stephen mallette Avatar answered Nov 02 '25 21:11

stephen mallette