ex_orient v0.1.2 ExOrient.DB.Graph

Provides Graph commands

Summary

Functions

Create an edge. Examples

Create a vertex or edge. Examples

Run a delete vertex or edge command. Examples

Functions

create_edge(opts \\ [])

Create an edge. Examples:

> ExOrient.DB.create(edge: "E", from: "#15:5", to: "#15:6", content: %{name: "Hello"})
[%MarcoPolo.Document{class: "E", fields: %{"in" => #MarcoPolo.RID<#15:6>,
"name" => "Hello", "out" => #MarcoPolo.RID<#15:5>}, rid: _, version: _}]
create_vertex(opts \\ [])

Create a vertex or edge. Examples:

> ExOrient.DB.create_vertex(vertex: "V", set: [name: "Steve"])
%MarcoPolo.Document{class: "V", fields: %{"name" => "Steve"}, rid: _, version: _}

> ExOrient.DB.create_vertex(vertex: "V", content: %{name: "Bob"})
%MarcoPolo.Document{class: "V", fields: %{"name" => "Bob"}, rid: _, version: _}
delete(opts \\ [])

Run a delete vertex or edge command. Examples:

> DB.delete(vertex: "V", where: %{make: "Ford"})
8

> DB.delete(edge: "E", where: %{type: "Truck"})
3