Skip to content
lvca edited this page Dec 22, 2012 · 2 revisions

SQL Create Vertex

This command creates a new Vertex into the database. Vertices, together with Edges, are the main components of a Graph-Database. A Vertex is a document of class OGraphVertex or a sub-class. Look also how to Create Edges.

Syntax

    CREATE VERTEX [<class>] [CLUSTER <cluster>] [SET <field> = <expression>[,]*]

Available Since

1.1.0

Examples

Create a new vertex of the base class 'V', namely OGraphVertex

    > create vertex

Create a new vertex type and a new vertex of the new type

    > create class V1 extends V
    > create vertex V1

Create a new vertex in a particular cluster

    > create vertex V1 cluster recent

Create a new vertex setting properties

    > create vertex set brand = 'fiat'

Create a new vertex of type V1 setting properties

    > create vertex V1 set brand = 'fiat', name = 'wow'

To know more about other SQL commands look at SQL commands.

Clone this wiki locally