cap-nodejs

CAP Node.js API


CAP Node.js API / cap-storage-knex/src / KnexTransactionManager

Class: KnexTransactionManager

Defined in: cap-storage-knex/src/knex-transaction-manager.ts:11

Implements

Constructors

Constructor

new KnexTransactionManager(knex): KnexTransactionManager

Defined in: cap-storage-knex/src/knex-transaction-manager.ts:14

Parameters

knex

Knex

Returns

KnexTransactionManager

Methods

afterCommit()

afterCommit(fn): void

Defined in: cap-storage-knex/src/knex-transaction-manager.ts:52

Parameters

fn

() => void | Promise<void>

Returns

void

Implementation of

CapTransactionManagerPort.afterCommit


afterRollback()

afterRollback(fn): void

Defined in: cap-storage-knex/src/knex-transaction-manager.ts:60

Parameters

fn

(error) => void | Promise<void>

Returns

void

Implementation of

CapTransactionManagerPort.afterRollback


getCurrentContext()

getCurrentContext(): CapOperationContext<Transaction<any, any[]>> | undefined

Defined in: cap-storage-knex/src/knex-transaction-manager.ts:48

Returns

CapOperationContext<Transaction<any, any[]>> | undefined

Implementation of

CapTransactionManagerPort.getCurrentContext


runInTransaction()

runInTransaction<T>(options, fn): Promise<T>

Defined in: cap-storage-knex/src/knex-transaction-manager.ts:16

Type Parameters

T

T

Parameters

options

CapTransactionOptions

fn

(ctx) => Promise<T>

Returns

Promise<T>

Implementation of

CapTransactionManagerPort.runInTransaction