A thin wrapper around an ArangoJSDatabase
instance. It provides direct and easy access to the ArangoJS instance itself, but also adds a few convenience methods,
for optional use.
// the native ArangoJS driver instance is exposed on the `db.driver` property db.driver.query(aql`FOR d IN user FILTER d.name LIKE ${name} RETURN d`);
// the backseat driver method, which immediately calls cursor.all() // on the results, returning all the documents, and not the cursor db.query(aql`FOR d IN user FILTER d.name LIKE ${name} RETURN d`);
The regular driver.query method will return a database cursor. If you wish to just
return all the documents in the result at once (same as invoking cursor.all()),
then use this method instead.
TODO: support for generic types on the retun value
Will only return the first value of a query result. One can quite easily handle
this via the AQL query itself, but in cases where you have issued a query where
you would typically expect either no result or exactly one result, or are only interested
in the first result, it may convenient to simply use use this function instead
A thin wrapper around an
ArangoJS
Database instance. It provides direct and easy access to the ArangoJS instance itself, but also adds a few convenience methods, for optional use.The constructor accepts an
ArangoJS
Config