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;
};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
TRow extends object = Record<string, unknown>
TKey extends string | number = string | number
{
key: TKey;
metadata?: Record<string, unknown>;
type: "enter";
value: TRow;
}{
key: TKey;
metadata?: Record<string, unknown>;
type: "enter";
value: TRow;
}key: TKey;key: TKey;optional metadata: Record<string, unknown>;optional metadata: Record<string, unknown>;type: "enter";type: "enter";value: TRow;value: TRow;Current value for the entering row
{
key: TKey;
metadata?: Record<string, unknown>;
type: "exit";
value: TRow;
}{
key: TKey;
metadata?: Record<string, unknown>;
type: "exit";
value: TRow;
}key: TKey;key: TKey;optional metadata: Record<string, unknown>;optional metadata: Record<string, unknown>;type: "exit";type: "exit";value: TRow;value: TRow;Current value for the exiting row
{
key: TKey;
metadata?: Record<string, unknown>;
previousValue: TRow;
type: "update";
value: TRow;
}{
key: TKey;
metadata?: Record<string, unknown>;
previousValue: TRow;
type: "update";
value: TRow;
}key: TKey;key: TKey;optional metadata: Record<string, unknown>;optional metadata: Record<string, unknown>;previousValue: TRow;previousValue: TRow;Previous value before the batch
type: "update";type: "update";value: TRow;value: TRow;Current value after the update