ex_orient v0.1.2 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

alter(opts \\ [])
command(query)

Execute a raw query with MarcoPolo and return the response.

> ExOrient.DB.command("SELECT FROM ProgrammingLanguage")
[%MarcoPolo.Document{class: "ProgrammingLanguage", fields: _, rid: _, version: _} | _rest]

All other functions in this module use this command to execute. 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"})
command(query, list)
create(opts \\ [])
delete(opts \\ [])
drop(opts \\ [])
insert(opts)

See ExOrient.DB.CRUD.insert/1.

rebuild(opts)

See ExOrient.DB.Indexes.rebuild/1.

select(field)

See ExOrient.DB.CRUD.select/1.

select(field, opts)

See ExOrient.DB.CRUD.select/2.

truncate(opts)

See ExOrient.DB.CRUD.truncate/1.

update(obj, opts)

See ExOrient.DB.CRUD.update/2.