I want the equivalant of this syntax in SQL:
create class Person extends V
in Gremlin
I want the equivalant of this syntax in SQL:
create class Person extends V
in Gremlin
I'm not sure it is possible to manipulate OrientDB schema through Gremlin. Gremlin is independent on OrientDB and is not adapted on schemas because not all of graph databases support schemas.
For adding vertex of particular class in OrientDB you can use Graph API (see doc). If you prepend string class:
before the name of the class, you will create a vertex of this class.
graph.addVertex("class:User");
This snippet will create vertex of class User
. I hope it will help you.