@arcmantle/chronicle / batch-transaction
batch-transaction
Interfaces
BatchAPI
Defined in: batch-transaction.ts:15
Properties
batch()
batch: <
T,R>(object,action) =>R
Defined in: batch-transaction.ts:20
Type Parameters
T
T extends object
R
R
Parameters
object
T
action
(observed) => R
Returns
R
beginBatch()
beginBatch: (
obj) =>void
Defined in: batch-transaction.ts:17
Parameters
obj
object
Returns
void
commitBatch()
commitBatch: (
obj) =>void
Defined in: batch-transaction.ts:18
Parameters
obj
object
Returns
void
getBatchFrames()
getBatchFrames: (
root) =>BatchFrame[] |undefined
Defined in: batch-transaction.ts:16
Parameters
root
object
Returns
BatchFrame[] | undefined
rollbackBatch()
rollbackBatch: (
obj) =>void
Defined in: batch-transaction.ts:19
Parameters
obj
object
Returns
void
Methods
transaction()
transaction<
T,R>(object,action):RextendsPromise<U> ?Promise<TransactionResult<U>> :TransactionResult<R>
Defined in: batch-transaction.ts:21
Type Parameters
T
T extends object
R
R
Parameters
object
T
action
(observed) => R
Returns
R extends Promise<U> ? Promise<TransactionResult<U>> : TransactionResult<R>
BatchFrame
Defined in: batch-transaction.ts:13
Properties
id
id:
string
Defined in: batch-transaction.ts:13
marker
marker:
number
Defined in: batch-transaction.ts:13
TransactionResult
Defined in: batch-transaction.ts:11
Type Parameters
R
R
Properties
marker
marker:
number
Defined in: batch-transaction.ts:11
result
result:
R
Defined in: batch-transaction.ts:11
undo()
undo: () =>
void
Defined in: batch-transaction.ts:11
Returns
void
Type Aliases
BatchDeps
BatchDeps =
Pick<ChronicleCore,"chronicle"|"getRoot">
Defined in: batch-transaction.ts:9
Functions
createBatchTransaction()
createBatchTransaction(
deps):BatchAPI
Defined in: batch-transaction.ts:29