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/JoinOnCallback.md
JoinOnCallback
ts
type JoinOnCallback<TContext> = (refs) => any;Defined in: packages/db/src/query/builder/types.ts:641
JoinOnCallback - Type for join condition callback functions
These callbacks receive refs for all available tables (including the newly joined table) and should return a boolean expression defining the join condition.
Important: The newly joined table is NOT marked as optional in this callback, even for left/right/full joins, because optionality is applied AFTER the join condition is evaluated.
Example: (refs) => eq(refs.users.id, refs.orders.userId)
Type Parameters#
TContext#
TContext extends Context
Parameters#
refs#
RefsForContext<TContext>
Returns#
any