Member Junction
    Preparing search index...

    Facts about a dialect's statement grammar that code rewriting or screening SQL needs.

    interface DialectGrammar {
        AllowsOrderByInCTE: boolean;
        AllowsOrderByInDerivedTable: boolean;
        CallerSQLForbiddenFunctions: readonly string[];
        CorrelatedJoin: CorrelatedJoinForm;
        DefaultPagingOrderBy: string;
        DefaultSchema?: string | null;
        DocumentTailClauses: readonly string[];
        ExtraColumnAliasForms?: readonly ColumnAliasForm[];
        PagingRequiresOrderBy: boolean;
        ParserGrammar: string | null;
        QueryHintKeyword: string | null;
        RecursiveKeyword: string | null;
        RowCapForms: readonly RowCapForm[];
        SelectListPagingOrderBy: string | null;
        SetOperatorKeywords: readonly string[];
        SourceNameIsRowValue?: boolean;
        SupportsNestedWith: boolean;
        UnseparatedStatementKeywords?: readonly string[];
        WriteStatementKeywords: readonly string[];
    }
    Index

    Properties

    AllowsOrderByInCTE: boolean

    Whether ORDER BY is legal inside a CTE definition without TOP, OFFSET or FOR XML.

    AllowsOrderByInDerivedTable: boolean

    Whether ORDER BY is legal inside a derived table without TOP, OFFSET or FOR XML.

    CallerSQLForbiddenFunctions: readonly string[]

    Functions SQL a caller supplied may not call, lower case; a trailing * matches every name with that prefix. They run SQL passed as a string, read files or other databases, act on the server, or pause the query.

    CorrelatedJoin: CorrelatedJoinForm

    How the dialect joins a correlated row source.

    DefaultPagingOrderBy: string

    The ORDER BY expression used to page a query that has none.

    DefaultSchema?: string | null

    The schema an unqualified table name resolves to when the session has not changed it, such as 'dbo' or 'public'; null when unqualified names resolve against a database or the current user rather than a fixed schema. Absent on dialects that do not say.

    DocumentTailClauses: readonly string[]

    Trailing clauses that make a SELECT return a document rather than rows, such as 'FOR JSON' and 'FOR XML'.

    ExtraColumnAliasForms?: readonly ColumnAliasForm[]

    Select-list alias forms the dialect accepts besides expr [AS] alias; none when absent.

    PagingRequiresOrderBy: boolean

    Whether skipping rows for a page requires an ORDER BY.

    ParserGrammar: string | null

    The node-sql-parser grammar (its database option) that reads this dialect, such as 'TransactSQL', 'PostgresQL', 'MySQL', 'Snowflake' or 'Hive'; null when node-sql-parser has none.

    QueryHintKeyword: string | null

    The keyword that opens a statement's trailing query-hint clause, such as 'OPTION'; null when there is none.

    RecursiveKeyword: string | null

    The keyword after WITH that marks a recursive CTE, such as 'RECURSIVE'; null when plain WITH is used.

    RowCapForms: readonly RowCapForm[]

    The row-cap forms the dialect accepts.

    SelectListPagingOrderBy: string | null

    The ORDER BY expression for paging a set operation or a SELECT DISTINCT without an ORDER BY, where only select-list items are accepted; null when DefaultPagingOrderBy works there too.

    SetOperatorKeywords: readonly string[]

    The set-operation keywords the dialect accepts, upper case (UNION, INTERSECT, EXCEPT, MINUS).

    SourceNameIsRowValue?: boolean

    Whether a FROM source's name used as a value stands for the whole row, as in PostgreSQL's SELECT t FROM t and row_to_json(t). False when absent.

    SupportsNestedWith: boolean

    Whether a WITH clause may appear inside a CTE body or a subquery.

    UnseparatedStatementKeywords?: readonly string[]

    Upper-case keywords that start a new statement wherever they appear as a bare word at the top level of another one, for a dialect that needs no separator between statements (T-SQL runs SELECT 1 DELETE FROM t as two statements). Empty or absent when statements must be separated. Such a keyword directly followed by JOIN is a join hint (INNER MERGE JOIN), not a statement.

    WriteStatementKeywords: readonly string[]

    Upper-case keywords that begin a statement that writes data, changes the schema or runs code.