Member Junction
    Preparing search index...

    Everything a dialect needs to run MJ itself on the database: DDL, stored-procedure syntax, migration and batch control, schema introspection, transactions and the platform functions CodeGen emits. Only a full SQLDialect has one; a query-only dialect does not.

    interface DialectSchemaDDL {
        MaxColumnCount: number | null;
        MaxInRowSizeBytes: number | null;
        MaxKeyStringLength: number;
        TypeMap: DataTypeMap;
        AddColumnClause(col: ColumnDDLOptions): string;
        AffectedRowCountSQL(dmlStatement: string, alias: string): string;
        AlterColumnDDL(quotedTable: string, options: AlterColumnOptions): string;
        AtomicBatchScript(statements: string[]): string;
        AutoIncrementPKExpression(): string;
        BatchSeparator(): string;
        BooleanParameterType(): string;
        CanonicalSchemaName(name: string): string;
        CapIndexableType(rawSqlType: string): string;
        CastToBoundedString(expr: string, maxLength?: number): string;
        CastToUUID(expr: string): string;
        CommentOnColumn(
            schema: string,
            table: string,
            column: string,
            comment: string,
        ): string;
        CommentOnColumnIfAbsent(
            schema: string,
            table: string,
            column: string,
            comment: string,
        ): string;
        CommentOnObject(
            objectType: string,
            schema: string,
            name: string,
            comment: string,
        ): string;
        CommentOnObjectIfAbsent(
            objectType: string,
            schema: string,
            name: string,
            comment: string,
        ): string;
        ConditionalBlock(
            condition: string,
            thenSQL: string,
            elseSQL?: string,
        ): string;
        CreateOrReplaceSupported(objectType: string): boolean;
        CreateSavepointSQL(name: string): string;
        CreateSchemaDDL(schemaName: string): string;
        CreateTableIfAbsent(fullTable: string, columnsBody: string): string;
        CreateTableIfNotExistsDDL(
            schema: string,
            tableName: string,
            columnsDDL: string,
        ): string;
        EmptyUUIDLiteral(): string;
        EscapeFlywayStringInterpolation(sql: string): string;
        EstimateInRowBytes(rawSqlType: string): number;
        ExistenceCheckSQL(objectType: string, schema: string, name: string): string;
        FallbackType(): string;
        ForeignKeyGraphSQL(schema: string): string;
        FullTextIndexDDL(
            table: string,
            columns: string[],
            catalog?: string,
        ): string;
        FullTextSearchPredicate(column: string, searchTerm: string): string;
        GrantPermission(
            permission: string,
            objectType: string,
            schema: string,
            object: string,
            role: string,
        ): string;
        IndexDDL(options: IndexOptions): string;
        NewUUID(): string;
        ParameterDefault(value: string): string;
        ParameterRef(name: string): string;
        ProcedureCallSyntax(schema: string, name: string, params: string[]): string;
        RaiseSignalSQL(message: string): string;
        ReleaseSavepointSQL(name: string): string | null;
        ResolveAbstractType(options: ResolveTypeOptions): string;
        ReturnInsertedClause(columns?: string[]): string;
        RollbackToSavepointSQL(name: string): string;
        RowCountExpression(): string;
        SchemaIntrospectionQueries(): SchemaIntrospectionSQL;
        ScopeIdentityExpression(): string;
        SplitStatements(batch: string): string[];
        StringSplitFunction(value: string, delimiter: string): string;
        TriggerDDL(options: TriggerOptions): string;
        UUIDPKDefault(): string;
    }

    Implemented by

    Index

    Properties

    MaxColumnCount: number | null

    Maximum columns per table, or null when effectively unbounded.

    MaxInRowSizeBytes: number | null

    Maximum in-row bytes per row, or null when there is no limit.

    MaxKeyStringLength: number

    Maximum string length usable in an index key column.

    TypeMap: DataTypeMap

    The data type mapping from SQL Server types to this platform's.

    Methods

    • Wraps one DML statement so its affected-row count comes back as a one-row result set.

      Parameters

      • dmlStatement: string
      • alias: string

      Returns string

    • Description metadata SQL for a column.

      Parameters

      • schema: string
      • table: string
      • column: string
      • comment: string

      Returns string

    • A description (comment) statement for an object.

      Parameters

      • objectType: string
      • schema: string
      • name: string
      • comment: string

      Returns string

    • A CREATE TABLE wrapped in a create-if-not-exists guard.

      Parameters

      • schema: string
      • tableName: string
      • columnsDDL: string

      Returns string

    • A GRANT statement.

      Parameters

      • permission: string
      • objectType: string
      • schema: string
      • object: string
      • role: string

      Returns string