forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
SQL Create Edge
lvca edited this page Dec 22, 2012
·
2 revisions
This command creates a new Edge into the database. Edges, together with Vertices, are the main components of a Graph-Database. An Edge is a document of class OGraphEdge or a sub-class. Look also how to Create Vertex.
CREATE EDGE [<class>] [CLUSTER <cluster>] FROM <rid>|(<query>)|[<rid>]* TO <rid>|(<query>)|[<rid>]* [SET <field> = <expression>[,]*]
- 1.1.0: the command
- 1.2.0: the support for query and collection of RIDs in FROM/TO
> create edge from #10:3 to #11:4
> create class E1 extends E
> create edge E1 from #10:3 to #11:4
> create edge E1 cluster EuropeEdges from #10:3 to #11:4
> create edge from #10:3 to #11:4 set brand = 'fiat'
> create edge E1 from #10:3 to #11:4 set brand = 'fiat', name = 'wow'
> create edge Watched from (select from account where name = 'Luca') to (select from movies where type.name = 'action')
To know more about other SQL commands look at SQL commands.