import type { TransactionDescription, TransactionInfo } from "arangojs/transactions"; import * as transactions from "arangojs/transactions"; import type { AqlLiteral, AqlQuery } from "./aql.js"; import type { ArangoCollection, Document, DocumentData, DocumentOperationResult, DocumentRemovalResult, InsertDocumentOptions, ObjectWithDocumentKey, Patch, RemoveDocumentOptions, ReplaceDocumentOptions, TruncateCollectionOptions, UpdateDocumentOptions } from "./arango-collection.js"; import type { ArangoQueryStreamCursor, GeneralArrayCursor } from "./arango-cursor.js"; import type { ArangoDatabase, CursorOptions, QueryOptions } from "./arango-database.js"; import type { ArangoStatementOptions } from "./arango-statement.js"; export { TransactionDescription, TransactionInfo }; export declare class ArangoTransaction { private readonly _db; private readonly _trx; constructor(_db: ArangoDatabase, _trx: transactions.Transaction); id(): string; toString(): string; collection = any>(col: ArangoCollection | string): Promise | null>; commit(): Promise; abort(): Promise; status(): Promise; running(): 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>; } export declare class ArangoTransactionCollection = any> { private readonly _trx; private readonly _collection; constructor(_trx: transactions.Transaction, _collection: ArangoCollection); name(): string; document(id: string | ObjectWithDocumentKey): Promise>; exists(id: string | ObjectWithDocumentKey): Promise; save: ArangoTransactionCollection["insert"]; insert(data: DocumentData, opts?: InsertDocumentOptions): Promise>; remove(id: string | ObjectWithDocumentKey, options: RemoveDocumentOptions): Promise>; replace(id: string | ObjectWithDocumentKey, data: DocumentData, options?: ReplaceDocumentOptions): Promise>; update(id: string | ObjectWithDocumentKey, data: Patch>, options?: UpdateDocumentOptions): Promise>; truncate(opts: TruncateCollectionOptions): Promise; count(): Promise; } //# sourceMappingURL=arango-transaction.d.ts.map