Member Junction
    Preparing search index...

    Interface ExecuteSQLOptions

    Configuration options for SQL execution with logging support

    interface ExecuteSQLOptions {
        description?: string;
        ignoreLogging?: boolean;
        isMutation?: boolean;
        readOnlyTransaction?: boolean;
        simpleSQLFallback?: string;
        timeoutMs?: number;
    }
    Index

    Properties

    description?: string

    Optional description for this SQL operation, used by logging, if logging is supported by the underlying provider

    ignoreLogging?: boolean

    If true, this statement will not be logged to any logging session

    isMutation?: boolean

    Whether this is a data mutation operation (INSERT/UPDATE/DELETE or SP call that results in any data change)

    readOnlyTransaction?: boolean

    Run the statement inside a read-only transaction that is always rolled back, for SQL a caller supplied. Writes fail, and any session setting the statement changes (SET, set_config) is undone before the connection goes back to the pool, so it cannot reach a later request. Inside an ambient transaction the statement runs in that transaction as usual. PostgreSQL honours it; SQL Server, whose read queries cannot change session settings, ignores it.

    simpleSQLFallback?: string

    Simple SQL fallback for loggers to emit logging of a simpler SQL statement that doesn't have extra functionality that isn't important for migrations or other logging purposes.

    timeoutMs?: number

    The longest this statement may run, in milliseconds. When it is exceeded the database cancels the statement and the call rejects with a timeout error, so the work stops rather than only the wait. Omitted or 0 means the connection's usual limit applies. It can only shorten that limit, never lengthen it. Ignored inside an ambient transaction, whose statements follow the transaction's own limits.