buildMembershipShapePredicate
buildMembershipShapePredicate(
columns,claims):Predicate
Defined in: packages/contracts/src/supabase-rls.ts:562
The membership predicate — the read-path mirror of the membership select policy, from the
same column declarations.
The containment becomes a first-class InSubqueryPredicate rather than SQL text, which buys
something the text form could not: the engine maintains the inner set incrementally and shares it
across every shape referencing the same subquery, so an entitlement-shaped membership costs one
index rather than one per shape. The subquery is uncorrelated, as the engine requires — the inner
where reads the membership table’s own columns only.
Parameters
Section titled “Parameters”columns
Section titled “columns”SupabaseMembershipShapeColumns
claims
Section titled “claims”{[key: string]: unknown; app_metadata?: {[key: string]: unknown; roles?: string[]; }; sub?: string; } | null