import { default } from "https://deno.land/x/neo4j_lite_client@4.4.6/core/transaction.ts";
Represents a transaction in the Neo4j database.
Constructors
new
default(unnamed 0: { connectionHolder: ConnectionHolder; onClose: () => void; onBookmark: (bookmark: Bookmark) => void; onConnection: () => void; reactive: boolean; fetchSize: number; impersonatedUser?: string; })Properties
private
_connectionHolder: ConnectionHolderprivate
_onBookmark: (bookmark: Bookmark) => voidprivate
_onError: (error: Error) => Promise<Connection | void>Methods
_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.