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/GroupByCallback.md
GroupByCallback
ts
type GroupByCallback<TContext> = (refs) => any;Defined in: packages/db/src/query/builder/types.ts:625
GroupByCallback - Type for groupBy clause callback functions
These callbacks receive refs for all available tables and should return expressions that will be used for grouping query results.
Example: (refs) => refs.orders.status
Type Parameters#
TContext#
TContext extends Context
Parameters#
refs#
RefsForContext<TContext>
Returns#
any