/// import { AqlLiteral, AqlQuery } from "./aql-query"; import { ArangoCollection, DocumentCollection, EdgeCollection } from "./collection"; import { Config } from "./connection"; import { ArrayCursor } from "./cursor"; import { Graph } from "./graph"; import { Route } from "./route"; import { ArangoSearchView, ArangoView, ViewType } from "./view"; export declare type TransactionCollections = string | ArangoCollection | (string | ArangoCollection)[] | { write?: string | ArangoCollection | (string | ArangoCollection)[]; read?: string | ArangoCollection | (string | ArangoCollection)[]; }; export declare type TransactionOptions = { lockTimeout?: number; maxTransactionSize?: number; intermediateCommitCount?: number; intermediateCommitSize?: number; waitForSync?: boolean; }; export declare type ServiceOptions = { [key: string]: any; configuration?: { [key: string]: any; }; dependencies?: { [key: string]: any; }; }; export declare type QueryOptions = { allowDirtyRead?: boolean; count?: boolean; batchSize?: number; cache?: boolean; memoryLimit?: number; ttl?: number; timeout?: number; options?: { failOnWarning?: boolean; profile?: boolean; maxTransactionSize?: number; stream?: boolean; skipInaccessibleCollections?: boolean; maxWarningsCount?: number; intermediateCommitCount?: number; satteliteSyncWait?: number; fullCount?: boolean; intermediateCommitSize?: number; optimizer?: { rules?: string[]; }; maxPlans?: number; }; }; export declare type ExplainOptions = { optimizer?: { rules?: string[]; }; maxNumberOfPlans?: number; allPlans?: boolean; }; export declare type ExplainPlan = { nodes: any[]; rules: any[]; collections: any[]; variables: any[]; estimatedCost: number; estimatedNrItems: number; initialize: boolean; isModificationQuery: boolean; }; export declare type ExplainResult = { plan?: ExplainPlan; plans?: Array; cacheable: boolean; warnings: any[]; stats: { rulesExecuted: number; rulesSkipped: number; plansCreated: number; }; }; export declare type ParseResult = { parsed: boolean; collections: any[]; bindVars: any[]; ast: any[]; }; export declare type QueryTracking = { enabled: boolean; maxQueryStringLength: number; maxSlowQueries: number; slowQueryThreshold: number; trackBindVars: boolean; trackSlowQueries: boolean; }; export declare type QueryTrackingOptions = { enabled?: boolean; maxQueryStringLength?: number; maxSlowQueries?: number; slowQueryThreshold?: number; trackBindVars?: boolean; trackSlowQueries?: boolean; }; export declare type RunningQuery = { id: string; query: string; bindVars: any; runTime: number; started: string; state: string; stream: boolean; }; export interface ViewDescription { id: string; name: string; type: ViewType; } export interface CreateDatabaseUser { username: string; passwd?: string; active?: boolean; extra?: { [key: string]: any; }; } export declare class Database { private _connection; constructor(config?: Config); readonly name: string | null; route(path?: string, headers?: Object): Route; acquireHostList(): Promise; close(): void; useDatabase(databaseName: string): this; useBearerAuth(token: string): this; useBasicAuth(username?: string, password?: string): this; get(): Promise; exists(): Promise; createDatabase(databaseName: string, users?: CreateDatabaseUser[]): Promise; listDatabases(): Promise; listUserDatabases(): Promise; dropDatabase(databaseName: string): Promise; collection(collectionName: string): DocumentCollection; edgeCollection(collectionName: string): EdgeCollection; listCollections(excludeSystem?: boolean): Promise; collections(excludeSystem?: boolean): Promise; truncate(excludeSystem?: boolean): Promise<[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]>; arangoSearchView(viewName: string): ArangoSearchView; listViews(): Promise; views(): Promise; graph(graphName: string): Graph; listGraphs(): Promise; graphs(): Promise; transaction(collections: TransactionCollections, action: string): Promise; transaction(collections: TransactionCollections, action: string, params?: Object): Promise; transaction(collections: TransactionCollections, action: string, params?: Object, options?: TransactionOptions): Promise; transaction(collections: TransactionCollections, action: string, lockTimeout?: number): Promise; transaction(collections: TransactionCollections, action: string, params?: Object, lockTimeout?: number): Promise; query(query: string | AqlQuery | AqlLiteral): Promise; query(query: AqlQuery, opts?: QueryOptions): Promise; query(query: string | AqlLiteral, bindVars?: any, opts?: QueryOptions): Promise; explain(query: string | AqlQuery | AqlLiteral): Promise; explain(query: AqlQuery, opts?: ExplainOptions): Promise; explain(query: string | AqlLiteral, bindVars?: any, opts?: ExplainOptions): Promise; parse(query: string | AqlQuery | AqlLiteral): Promise; parse(query: AqlQuery): Promise; parse(query: string | AqlLiteral): Promise; queryTracking(): Promise; setQueryTracking(opts?: QueryTrackingOptions): Promise; listRunningQueries(): Promise>; listSlowQueries(): Promise; clearSlowQueries(): Promise; killQuery(queryId: string): Promise; listFunctions(): Promise; createFunction(name: string, code: string): Promise; dropFunction(name: string, group?: boolean): Promise; listServices(): Promise; installService(mount: string, source: any, opts?: ServiceOptions): Promise; upgradeService(mount: string, source: any, opts?: ServiceOptions): Promise; replaceService(mount: string, source: any, opts?: ServiceOptions): Promise; uninstallService(mount: string, opts?: any): Promise; getService(mount: string): Promise; getServiceConfiguration(mount: string, minimal?: boolean): Promise; updateServiceConfiguration(mount: string, cfg: any, minimal?: boolean): Promise; replaceServiceConfiguration(mount: string, cfg: any, minimal?: boolean): Promise; getServiceDependencies(mount: string, minimal?: boolean): Promise; updateServiceDependencies(mount: string, cfg: any, minimal?: boolean): Promise; replaceServiceDependencies(mount: string, cfg: { [key: string]: string; }, minimal?: boolean): Promise; enableServiceDevelopmentMode(mount: string): Promise; disableServiceDevelopmentMode(mount: string): Promise; listServiceScripts(mount: string): Promise; runServiceScript(mount: string, name: string, args: any): Promise; runServiceTests(mount: string, opts: any): Promise; getServiceReadme(mount: string): Promise; getServiceDocumentation(mount: string): Promise; downloadService(mount: string): Promise; commitLocalServiceState(replace?: boolean): Promise; version(): Promise; login(username?: string, password?: string): Promise; } //# sourceMappingURL=database.d.ts.map