DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/type-aliases/WhereCallback.md
WhereCallback
ts
type WhereCallback<TContext> = (refs) => any;Defined in: packages/db/src/query/builder/types.ts:218
WhereCallback - Type for where/having clause callback functions
These callbacks receive a refs object containing RefProxy instances for all available tables. The callback should return a boolean expression that will be used to filter query results.
Example: (refs) => eq(refs.users.age, 25)
Type Parameters#
TContext#
TContext extends Context
Parameters#
refs#
RefsForContext<TContext>
Returns#
any