class TransactionPromise
extends Transaction
Re-export
import { TransactionPromise } from "https://deno.land/x/neo4j_driver_lite@5.14.0-alpha01/mod.ts";
Represents a Promise object and a Transaction object.
Resolving this object promise verifies the result of the transaction begin and returns the Transaction object in case of success.
The object can still also used as Transaction for convenience. The result of begin will be checked during the next API calls in the object as it is in the transaction.
Constructors
new
TransactionPromise(unnamed 0: { connectionHolder: ConnectionHolder; onClose: () => void; onBookmarks: (newBookmarks: Bookmarks,
previousBookmarks: Bookmarks,
database?: string,
Properties
private
optional
_beginPromise: Promise<Transaction>private
optional
_resolve: (value: Transaction | PromiseLike<Transaction>) => voidMethods
private
_getOrCreateBeginPromise(): Promise<Transaction>private
_onBeginError(error: Error): voidprivate
_onBeginMetadata(metadata: any): voidprivate
_toTransaction(): Transaction_begin(bookmarks: () => Promise<Bookmarks>, txConfig: TxConfig): void
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<any>
Catch errors when using promises.
then<TResult1 = Transaction, TResult2 = never>(onfulfilled?: ((value: Transaction) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>
Waits for the begin to complete.