Skip to main content
Module

x/darango/arango.ts>Arango

An ArangoDB driver for Deno.
Latest
class Arango
import { Arango } from "https://deno.land/x/darango@0.1.6/arango.ts";

The ArangoDB client.

Constructors

new
Arango(uri: string, jwt: string)

Properties

private
ax: axiod

Methods

collection<T>(name: string): Promise<Collection<T>>

Get an existing collection by name.

createCollection<T>(name: string, edge?: boolean): Promise<Collection<T>>
createGraph(
name: string,
edges: EdgeDefinitions[],
...orphans: string[],
): Promise<Graph>

Create a graph on this instance.

edgeCollection<T, F>(name: string): Promise<EdgeCollection<T, F>>

Get an existing Edge collection by name.

graph(name: string): Promise<Graph>
listGraphs(): Promise<Graph[]>

Get all graphs stored on this instance.

query<T>(aql: string, options?: CursorOptions): ArangoCursor<T>

Create a new Cursor to execute a query. NOTE: Data returned by this cannot be turned into a Document object for direct modification.

Static Methods

basicAuth(options: ArangoOptionsBasicAuth): Promise<Arango>

Create a new Arango instance by first obtaining a valid JWT token.

jwtAuth(options: ArangoOptionsJWT): Promise<Arango>

Create a new Arango instance using a previously obtained JWT token, validating it first.