ArangoXEcto.aql_query
You're seeing just the function
aql_query
, go back to ArangoXEcto module for more information.
Specs
aql_query(Ecto.Repo.t(), query(), vars(), [DBConnection.option()]) :: {:ok, [map()]} | {:error, any()}
Runs a raw AQL query on the database.
This will create a transaction and cursor on Arango and run the raw query.
If there is an error in the query such as a syntax error, an Arangox.Error
will be raised.
Parameters
repo
- The Ecto repo module to use for queriesquery
- The AQL query string to executevars
- A keyword list or a map with the values for variables in the queryopts
- Options to be passed toDBConnection.transaction/3
Examples
iex> ArangoXEcto.aql_query(
Repo,
"FOR var in users FILTER var.first_name == @fname AND var.last_name == @lname RETURN var",
fname: "John",
lname: "Smith"
)
{:ok,
[
%{
"_id" => "users/12345",
"_key" => "12345",
"_rev" => "_bHZ8PAK---",
"first_name" => "John",
"last_name" => "Smith"
}
]}