buildRoleGuardedStatement
buildRoleGuardedStatement(
roleName,statementSql):string
Defined in: packages/contracts/src/sql-role-guard.ts:23
Wrap one already-rendered SQL statement (no trailing semicolon) in the role-existence guard.
statementSql is embedded as a PL/pgSQL string literal, so it is escaped as a whole — callers pass
ordinary SQL with real single quotes and real double-quoted identifiers.
Parameters
Section titled “Parameters”roleName
Section titled “roleName”string
statementSql
Section titled “statementSql”string
Returns
Section titled “Returns”string