TransactionRecord
A write as the outbox keeps it
Import
import { TransactionRecord } from "@hyper-fetch/db"
Source
Package
Preview
type TransactionRecord = {
collection: string;
createdAt: number;
dependsOn: string[];
id: string;
key: RowKey;
op: MutationOperation;
sent: boolean;
temporaryKey?: boolean;
transaction?: { name: string; writes: TransactionWrite[] };
values: Record<string, unknown>;
}
Structure
TransactionRecord
| Name | Type | Description |
|---|---|---|
| collection | | |
| createdAt | | |
| dependsOn | | |
| id | | |
| key | | |
| op | | |
| sent | | Set before the request goes out, so a restart sends it again with the same id |
| temporaryKey | | The key is temporary until the server assigns one, so it is not sent |
| transaction | | A named transaction: its writes go out through the transaction's
|
| values | |
