Member Junction
    Preparing search index...

    Minimal dialect interface consumed by @memberjunction/sql-parser.

    SQLParser needs only these properties to be dialect-aware. The full SQLDialect class implements this interface plus 80+ additional methods for DDL/DML generation, data type mapping, etc.

    When adding a new database platform, implement at minimum this interface for parser support. Implement the full SQLDialect for complete MJ support.

    interface SQLParserDialect {
        AllowsOrderByInCTE: boolean;
        DefaultPagingOrderBy: string;
        ParserDialect: string;
        QuoteIdentifier(name: string): string;
    }
    Index

    Properties

    AllowsOrderByInCTE: boolean

    Whether ORDER BY is legal inside CTE definitions on this platform

    DefaultPagingOrderBy: string

    Default ORDER BY expression for paging when no ORDER BY exists. SQL Server: '(SELECT NULL)', PostgreSQL: '1'

    ParserDialect: string

    node-sql-parser dialect string (e.g., 'TransactSQL', 'PostgresQL', 'MySQL')

    Methods

    • Quotes a database identifier. SQL Server: [name], PostgreSQL: "name", MySQL: name

      Parameters

      • name: string

      Returns string