This command creates a new Vertex into the database. Vertices, together with Edges, are the main components of a Graph. OrientDB supports polymorphism on vertices. The base class is "V" (before 1.4 was called "OGraphVertex"). Look also how to Create Edges.
NOTE: While running as distributed, vertex creation could be done in two steps (create+update). This could break some constraint defined at Vertex's class level. To avoid this kind of problem disable the constrains in Vertex's class. | |
---|---|
CREATE VERTEX [<class>] [CLUSTER <cluster>] [SET <field> = <expression>[,]*]
create vertex
create class V1 extends V
create vertex V1
create vertex V1 cluster recent
create vertex set brand = 'fiat'
create vertex V1 set brand = 'fiat', name = 'wow'
create vertex Employee content { "name" : "Jay", "surname" : "Miner" }
To know more about other SQL commands look at SQL commands.