Member Junction
    Preparing search index...

    Interface FieldSecuritySQLContext

    What FieldSecuritySQLGate needs to judge one piece of SQL for one user.

    interface FieldSecuritySQLContext {
        Catalog: readonly EntityInfo[];
        Dialect: SQLScreeningDialect;
        ProjectionStarOffsets?: ReadonlySet<number>;
        ReadEntities?: readonly EntityInfo[];
        RefuseUnknownRelations?: boolean;
        TargetEntity?: EntityInfo;
        User: UserInfo;
    }
    Index

    Properties

    Catalog: readonly EntityInfo[]

    Every entity the provider knows, so base views and tables named in the text are recognized.

    The dialect whose lexical rules the database applies to the text.

    ProjectionStarOffsets?: ReadonlySet<number>

    For a saved query's rendered SQL: the character offsets of * tokens that a structural reading of the whole statement has shown reach the caller only as output columns (a plain * or alias.* select item of a block whose rows become the result unchanged in shape). Such a star is not refused as a whole-row read; the caller must instead drop the denied columns it brings from the result. Every other star is judged as usual.

    ReadEntities?: readonly EntityInfo[]

    Entities the SQL is known to read beyond those its text names, such as a query's declared entities.

    RefuseUnknownRelations?: boolean

    For a whole statement, such as a saved query's SQL: refuse, for a user carrying any field denial, a relation that is not a CTE and not the base view or base table of a catalog entity (a custom view, synonym, table-valued function, temp table, or a name in another schema or database), and EXEC/CALL. What such a relation reads cannot be checked.

    TargetEntity?: EntityInfo

    For a filter, sort or aggregate fragment: the entity whose view the fragment runs against. Its columns can be named without a qualifier, so its denied fields are always checked.

    User: UserInfo

    The acting user.