1 | /**
|
2 | * ```js
|
3 | * import arangojs, { aql, Database } from "arangojs";
|
4 | * ```
|
5 | *
|
6 | * The "index" module is the default entry point when importing the arangojs
|
7 | * module or using the web build in the browser.
|
8 | *
|
9 | * If you are just getting started, you probably want to use the
|
10 | * {@link arangojs} function, which is also the default export of this module,
|
11 | * or the {@link database.Database} class for which it is a wrapper.
|
12 | *
|
13 | * @packageDocumentation
|
14 | */
|
15 | import { Config } from "./connection.js";
|
16 | import { Database } from "./database.js";
|
17 | /**
|
18 | * Creates a new `Database` instance with its own connection pool.
|
19 | *
|
20 | * This is a wrapper function for the {@link database.Database:constructor}.
|
21 | *
|
22 | * @param config - An object with configuration options.
|
23 | *
|
24 | * @example
|
25 | * ```js
|
26 | * const db = arangojs({
|
27 | * url: "http://127.0.0.1:8529",
|
28 | * databaseName: "myDatabase",
|
29 | * auth: { username: "admin", password: "hunter2" },
|
30 | * });
|
31 | * ```
|
32 | */
|
33 | export declare function arangojs(config?: Config): Database;
|
34 | /**
|
35 | * Creates a new `Database` instance with its own connection pool.
|
36 | *
|
37 | * This is a wrapper function for the {@link database.Database:constructor}.
|
38 | *
|
39 | * @param url - Base URL of the ArangoDB server or list of server URLs.
|
40 | * Equivalent to the `url` option in {@link connection.Config}.
|
41 | *
|
42 | * @example
|
43 | * ```js
|
44 | * const db = arangojs("http://127.0.0.1:8529", "myDatabase");
|
45 | * db.useBasicAuth("admin", "hunter2");
|
46 | * ```
|
47 | */
|
48 | export declare function arangojs(url: string | string[], name?: string): Database;
|
49 | export default arangojs;
|
50 | export { aql } from "./aql.js";
|
51 | export { Database } from "./database.js";
|
52 | //# sourceMappingURL=index.d.ts.map |
\ | No newline at end of file |