Framework
ITransactionContext
Interface: ITransactionContext
Transaction context interface exposed to user code.
Provides methods for reading and staging writes within a transaction.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
mode | readonly | ResolvedTransactionMode | Get the current transaction mode. |
mutationCount | readonly | number | Get mutation count so far. |
Methods
delete()
delete(key): voidStage a delete operation. Executed on commit.
Parameters
| Parameter | Type |
|---|---|
key | string |
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 Parameter | Default type |
|---|---|
V | unknown |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
Promise<V>
set()
set(key, value): voidStage a set operation. Written on commit.
Parameters
| Parameter | Type |
|---|---|
key | string |
value | unknown |
Returns
void
