WhereClause
WhereClause = (
columns,user,lookups) =>DrizzleSQL|undefined
Defined in: packages/permissions/src/types.ts:186
A function that produces a Drizzle WHERE clause for row-level permission filtering.
Parameters
Section titled “Parameters”columns
Section titled “columns”Record<string, unknown>
The table’s column references for building filter expressions.
unknown
The current user object (from @cfast/auth).
lookups
Section titled “lookups”Record<string, unknown>
Resolved values from the grant’s with map (see Grant.with).
Empty object when the grant declares no with map. Each key holds the awaited
result of the lookup function with the same name.
Returns
Section titled “Returns”DrizzleSQL | undefined
A Drizzle SQL expression to restrict matching rows, or undefined for no restriction.