Reputation: 21
my question is simple (I hope the answer is simple too) I want to return the RID when I create a vertex
client.command("create class Tag extends V") client.command("create vertex Tag set idTag=1, nomTag='tag1'")
Can I get the RID return? or if I cannot can I create the vertex with a RID I chose? like:
client.command("create vertex Tag set rid='#21:1234', idTag=1, nomTag='tag1'")
-Using orientdb 2.2 -Pyorient (python API) thx for your help
Upvotes: 1
Views: 255
Reputation: 21
just need to
RidReturn = client.command("create vertex Tag set idTag=1, nomTag='tag1'")
Rid = RidReturn[0]._rid
print(RidReturn)
[pyorient.otypes.OrientRecord object at 0x107e00a90]
print(Rid)
'#27:3077'
Upvotes: 1