Open History to see the last commit
Type Alias: DeltaEvent<TRow, TKey>#
type DeltaEvent<TRow, TKey> =
| {
key: TKey;
metadata?: Record<string, unknown>;
type: "enter";
value: TRow;
}
| {
key: TKey;
metadata?: Record<string, unknown>;
type: "exit";
value: TRow;
}
| {
key: TKey;
metadata?: Record<string, unknown>;
previousValue: TRow;
type: "update";
value: TRow;
};
Defined in: packages/db/src/query/effect.ts:38
Delta event emitted when a row enters, exits, or updates within a query result
Type Parameters#
TRow#
TRow extends object = Record<string, unknown>
TKey#
TKey extends string | number = string | number
Type Declaration#
{
key: TKey;
metadata?: Record<string, unknown>;
type: "enter";
value: TRow;
}
key#
key: TKey;
metadata?#
optional metadata: Record<string, unknown>;
type#
type: "enter";
value#
value: TRow;
Current value for the entering row
{
key: TKey;
metadata?: Record<string, unknown>;
type: "exit";
value: TRow;
}
key#
key: TKey;
metadata?#
optional metadata: Record<string, unknown>;
type#
type: "exit";
value#
value: TRow;
Current value for the exiting row
{
key: TKey;
metadata?: Record<string, unknown>;
previousValue: TRow;
type: "update";
value: TRow;
}
key#
key: TKey;
metadata?#
optional metadata: Record<string, unknown>;
previousValue#
previousValue: TRow;
Previous value before the batch
type#
type: "update";
value#
value: TRow;
Current value after the update