import { Database as ArangoJS } from "arangojs"; import type { CompactOptions, EngineInfo, EngineStatsInfo, VersionInfo } from "arangojs/administration"; import type { DatabaseDescription } from "arangojs/databases"; import * as databases from "arangojs/databases"; import * as documents from "arangojs/documents"; import * as transactions from "arangojs/transactions"; import type { CreateDatabaseUserOptions } from "arangojs/users"; import { AqlLiteral, AqlQuery } from "./aql.js"; import { ArangoCollection, CreateCollectionOptions, CreateCollectionProperties, Document, DocumentMetadata, DropCollectionOptions, ObjectWithDocumentId, ObjectWithIndexId, RemoveDocumentOptions, ReplaceDocumentOptions, UpdateDocumentOptions } from "./arango-collection.js"; import { ArangoQueryStreamCursor, GeneralArrayCursor } from "./arango-cursor.js"; import { ArangoStatement, ArangoStatementOptions, ParseResult, StatementQueryOptions } from "./arango-statement.js"; import { ArangoTransaction, TransactionDescription } from "./arango-transaction.js"; import { ArangoView, CreateArangoSearchViewOptions, CreateSearchAliasViewOptions } from "./arango-view.js"; export type { CompactOptions, CreateDatabaseUserOptions, DatabaseDescription, EngineInfo, EngineStatsInfo, VersionInfo, }; export type CreateDatabaseOptions = Omit; export type QueryOptions = StatementQueryOptions & { cache?: boolean; }; export type CursorOptions = { count?: boolean; batchSize?: number | null; }; export type TransactionCollections = { exclusive?: (string | ArangoCollection)[] | string | ArangoCollection; read?: (string | ArangoCollection)[] | string | ArangoCollection; write?: (string | ArangoCollection)[] | string | ArangoCollection; }; export type ExecuteTransactionOptions = Omit & { collections: TransactionCollections & { allowImplicit?: boolean; }; action: string | Function; }; export type CreateTransactionOptions = transactions.TransactionOptions & { collections: TransactionCollections & { allowImplicit?: boolean; }; }; export declare class ArangoDatabase { private _data?; private _collectionsCache; private _viewsCache; static indexRegex: RegExp; static keyRegex: RegExp; constructor(database: ArangoJS); _arangojs: ArangoJS; _id(): Promise; _isSystem(): Promise; _name(): string; _path(): Promise; _properties(): Promise; _version(details?: false): Promise; _version(details: true): Promise; _compact(options?: CompactOptions): Promise; _engine(): Promise; _engineStats(): Promise; _flushCache(): void; _databases(): Promise; _createDatabase(name: string, options?: CreateDatabaseOptions, users?: CreateDatabaseUserOptions[]): Promise; _dropDatabase(name: string): Promise; _useDatabase(name: string): Promise; _collection = any>(name: string): Promise | null>; _collections(): Promise[]>; _create(name: string, properties: CreateCollectionProperties, type?: "document" | "edge" | number, options?: CreateCollectionOptions): Promise; _createDocumentCollection(name: string, properties: CreateCollectionProperties, options?: CreateCollectionOptions): Promise; _createEdgeCollection(name: string, properties: CreateCollectionProperties, options?: CreateCollectionOptions): Promise; _drop(name: string, options?: DropCollectionOptions): Promise; _truncate(name: string | ArangoCollection): Promise; _createView(name: string, type: "arangosearch", options: CreateArangoSearchViewOptions): Promise; _createView(name: string, type: "search-alias", options: CreateSearchAliasViewOptions): Promise; _dropView(name: string): Promise; _view(name: string): Promise; _views(): Promise; _executeTransaction(data: ExecuteTransactionOptions): Promise; _createTransaction(data: CreateTransactionOptions | string | number | ArangoTransaction): Promise; _transactions(): Promise; _createStatement(data: ArangoStatementOptions | AqlLiteral | AqlQuery): ArangoStatement; _parse(query: string | AqlLiteral): Promise; _query(query: string | AqlLiteral, bindVars: Record, cursorOptions: CursorOptions, options: QueryOptions): Promise | GeneralArrayCursor>; _query(query: string | AqlLiteral, bindVars?: Record, options?: QueryOptions & CursorOptions): Promise | GeneralArrayCursor>; _query(payload: ArangoStatementOptions | AqlQuery, cursorOptions: CursorOptions, options: QueryOptions): Promise | GeneralArrayCursor>; _query(payload: ArangoStatementOptions | AqlQuery, options?: QueryOptions & CursorOptions): Promise | GeneralArrayCursor>; _document = any>(id: string | ObjectWithDocumentId): Promise>; _exists(id: string | ObjectWithDocumentId): Promise; _remove = any>(id: string | ObjectWithDocumentId, options: RemoveDocumentOptions): Promise; }>; _remove = any>(id: string | ObjectWithDocumentId, overwrite?: boolean, waitForSync?: boolean): Promise; }>; _replace = any>(id: string | ObjectWithDocumentId, data: T, options: ReplaceDocumentOptions): Promise; }>; _replace = any>(id: string | ObjectWithDocumentId, data: T, overwrite?: boolean, waitForSync?: boolean): Promise; }>; _update = any>(id: string | ObjectWithDocumentId, data: Partial, options: UpdateDocumentOptions): Promise; }>; _update = any>(id: string | ObjectWithDocumentId, data: Partial, overwrite?: boolean, keepNull?: boolean, waitForSync?: boolean): Promise; }>; _index(id: string | ObjectWithIndexId): Promise; _dropIndex(id: string | ObjectWithIndexId): Promise; _getLicense(): Promise; _setLicense(data: string, options?: { force?: boolean; } | boolean): Promise; } //# sourceMappingURL=arango-database.d.ts.map