ex_orient v1.2.0 ExOrient.DB
MarcoPolo ExOrientDB wrapper that provides a clean syntax for queries. This
module simply routes SQL commands to the correct submodule, providing the
ability to call all commands through ExOrient.DB.
Summary
Functions
Execute a raw query with MarcoPolo and return the response
An alias for command/1
Execute a server-side script. type
can be either "SQL"
or "Javascript"
. str
is the
string of the script you want to run. Example
Functions
Execute a raw query with MarcoPolo and return the response.
ExOrient.DB.command("SELECT FROM ProgrammingLanguage")
# [%MarcoPolo.Document{class: "ProgrammingLanguage", fields: _, rid: _, version: _} | _rest]
Only use this function directly if you need the power of a raw query. Be sure to use the params argument if you need to bind variables:
ExOrient.DB.command("SELECT FROM ProgrammingLanguage WHERE name = :name", params: %{name: "Elixir"})
Execute a server-side script. type
can be either "SQL"
or "Javascript"
. str
is the
string of the script you want to run. Example:
DB.script("SQL", "begin; let v = create vertex V set name = 'test'; commit; return $v")
{:ok, %MarcoPolo.Document{fields: %{"name" => "test"}}}