LogoRobo.js
Framework

ITransactionContext

Interface: ITransactionContext

Transaction context interface exposed to user code.

Provides methods for reading and staging writes within a transaction.

Properties

PropertyModifierTypeDescription
modereadonlyResolvedTransactionModeGet the current transaction mode.
mutationCountreadonlynumberGet mutation count so far.

Methods

delete()

delete(key): void

Stage a delete operation. Executed on commit.

Parameters

ParameterType
keystring

Returns

void


read()

read<V>(key): Promise<V>

Read a value within the transaction. The value is tracked for conflict detection in optimistic mode.

Type Parameters

Type ParameterDefault type
Vunknown

Parameters

ParameterType
keystring

Returns

Promise<V>


set()

set(key, value): void

Stage a set operation. Written on commit.

Parameters

ParameterType
keystring
valueunknown

Returns

void

On this page