Skip to content

basalt / prisma/src / rlsPolicySql

Function: rlsPolicySql() ​

> rlsPolicySql(options): string

Defined in: prisma/src/rls.ts:77

Idempotent SQL that enables RLS and installs a tenant-isolation policy on each table. The policy restricts every row (read and write) to the tenant named by the current setting. Safe to run repeatedly (drops+recreates the policy).

Parameters ​

options ​

RlsPolicyOptions

Returns ​

string

Released under the MIT License.