Session variable key (e.g., 'app.current_tenant_id')
Type to cast to ('integer', 'uuid', 'boolean', 'timestamp', or 'text')
A ContextValue representing the session variable
// Integer session variable
column('tenant_id').eq(session.get('app.tenant_id', 'integer'))
// UUID session variable
column('org_id').eq(session.get('app.org_id', 'uuid'))
// Boolean session variable
column('is_admin').eq(session.get('app.is_admin', 'boolean'))
// Text session variable (default)
column('role').eq(session.get('app.role', 'text'))
Optionalname: string
Get a session variable with type casting
Maps to
current_setting(key)::TYPEin PostgreSQL.