Defined in: packages/db/src/query/effect.ts:93
Effect configuration
TRow extends object = Record<string, unknown>
TKey extends string | number = string | number
optional id: string;
Defined in: packages/db/src/query/effect.ts:98
Optional ID for debugging/tracing
optional onBatch: EffectBatchHandler<TRow, TKey>;
Defined in: packages/db/src/query/effect.ts:113
Called once per graph run with all delta events from that batch
optional onEnter: EffectEventHandler<TRow, TKey>;
Defined in: packages/db/src/query/effect.ts:104
Called once for each row entering the query result
optional onError: (error, event) => void;
Defined in: packages/db/src/query/effect.ts:116
Error handler for exceptions thrown by effect callbacks
Error
DeltaEvent<TRow, TKey>
void
optional onExit: EffectEventHandler<TRow, TKey>;
Defined in: packages/db/src/query/effect.ts:110
Called once for each row exiting the query result
optional onSourceError: (error) => void;
Defined in: packages/db/src/query/effect.ts:123
Called when a source collection enters an error or cleaned-up state. The effect is automatically disposed after this callback fires. If not provided, the error is logged to console.error.
Error
void
optional onUpdate: EffectEventHandler<TRow, TKey>;
Defined in: packages/db/src/query/effect.ts:107
Called once for each row updating within the query result
query: EffectQueryInput<any>;
Defined in: packages/db/src/query/effect.ts:101
Query to watch for deltas
optional skipInitial: boolean;
Defined in: packages/db/src/query/effect.ts:130
Skip deltas during initial collection load. Defaults to false (process all deltas including initial sync). Set to true for effects that should only process new changes.