import { Transaction } from "https://deno.land/x/neo4j_lite_client@4.4.6/core/index.ts";
Represents a transaction in the Neo4j database.
Properties
private
_onError: (error: Error) => Promise<Connection | void>Methods
_begin(bookmark: Bookmark | string | string[], txConfig: TxConfig): void
_onCompleteCallback(meta: { bookmark?: string | string[]; }): void
_onErrorCallback(err: any): Promise<Connection | void>
close(): Promise<void>
Closes the transaction
This method will roll back the transaction if it is not already committed or rolled back.
commit(): Promise<void>
Commits the transaction and returns the result.
After committing the transaction can no longer be used.
isOpen(): boolean
Check if this transaction is active, which means commit and rollback did not happen.
rollback(): Promise<void>
Rollbacks the transaction.
After rolling back, the transaction can no longer be used.