Module

x/pg_mem/interfaces-private.ts>_Transaction

An in memory postgres DB instance for your unit tests
Go to Latest
interface _Transaction
import { type _Transaction } from "https://dotland.deno.dev/x/pg_mem@2.6.3/interfaces-private.ts";

Properties

readonly
isChild: boolean

Methods

fork(): _Transaction

Create a new transaction within this transaction

commit(): _Transaction

Commit this transaction (returns the parent transaction)

fullCommit(): _Transaction

Commits this transaction and all underlying transactions

rollback(): _Transaction
delete(identity: symbol): void
set<T>(identity: symbol, data: T): T

Set data persisted in this transaction

get<T>(identity: symbol): T

Get data persisted in this transaction

getMap<T extends ImMap<any, any>>(identity: symbol): T
getSet<T>(identity: symbol): ImSet<T>
setTransient<T>(identity: symbol, data: T): T

Get transient data, which will only exist within the scope of the current statement

getTransient<T>(identity: symbol): T

Set transient data, which will only exist within the scope of the current statement

clearTransientData(): void