prorm API Reference
    Preparing search index...

    Interface PolicyOptions

    Options for creating a policy (PostgreSQL RLS)

    interface PolicyOptions {
        name: string;
        tableName: string;
        permissive?: boolean;
        command?: "SELECT" | "INSERT" | "UPDATE" | "DELETE" | "ALL";
        roles?: string[];
        withCheck?: string;
        using?: string;
        schema?: string;
        predicateFunction?: string;
        column?: string;
    }
    Index
    name: string

    Policy name

    tableName: string

    Table name

    permissive?: boolean

    If true, creates a permissive policy (combines with OR); if false, creates a restrictive policy (combines with AND)

    command?: "SELECT" | "INSERT" | "UPDATE" | "DELETE" | "ALL"

    Command the policy applies to (defaults to ALL)

    roles?: string[]

    Roles to apply the policy to

    withCheck?: string

    CHECK expression for INSERT/UPDATE

    using?: string

    USING expression for SELECT

    schema?: string

    Schema (for PostgreSQL)

    predicateFunction?: string

    MSSQL: Predicate function (e.g., 'dbo.fn_SecurityPredicate')

    column?: string

    MSSQL: Column to pass to predicate function