buildGrantScopeAccessShapeWhere
buildGrantScopeAccessShapeWhere(
scopeColumn,claims,options):SQL<unknown> |null
Defined in: packages/contracts/src/supabase-rls.ts:900
The Electric shape where for a grant-scope table, bypass included — the read counterpart of the
select policy in buildSupabaseGrantScopeNativePolicies, from the same declaration. A caller
holding a bypass grant gets null (no filter, every row — the policy’s OR branch); anyone else gets
buildGrantScopeShapeWhere over their resolved ids, i.e. the DENY_ALL sentinel by
reference when the set is empty (which is what lets a customWhere built on this probe as
claims-dependent). Use buildGrantScopeShapeWhere directly only when there is no bypass to mirror.
Parameters
Section titled “Parameters”scopeColumn
Section titled “scopeColumn”AnyColumn
claims
Section titled “claims”{[key: string]: unknown; app_metadata?: {[key: string]: unknown; roles?: string[]; }; sub?: string; } | null
options
Section titled “options”Returns
Section titled “Returns”SQL<unknown> | null