import { entityKind } from "../entity.js";
import type { MigrationConfig, MigrationMeta } from "../migrator.js";
import { type BuildRelationalQueryResult, type DBQueryConfig, type Relation, type TableRelationalConfig, type TablesRelationalConfig } from "../relations.js";
import { type QueryWithTypings, SQL } from "../sql/sql.js";
import { type Casing, type UpdateSet } from "../utils.js";
import { MsSqlColumn } from "./columns/common.js";
import type { MsSqlDeleteConfig } from "./query-builders/delete.js";
import type { MsSqlInsertConfig } from "./query-builders/insert.js";
import type { MsSqlSelectConfig } from "./query-builders/select.types.js";
import type { MsSqlUpdateConfig } from "./query-builders/update.js";
import type { MsSqlSession } from "./session.js";
import { MsSqlTable } from "./table.js";
export interface MsSqlDialectConfig {
    casing?: Casing;
}
export declare class MsSqlDialect {
    static readonly [entityKind]: string;
    constructor(config?: MsSqlDialectConfig);
    migrate(migrations: MigrationMeta[], session: MsSqlSession, config: MigrationConfig): Promise<void>;
    escapeName(name: string): string;
    escapeParam(_num: number): string;
    escapeString(str: string): string;
    buildDeleteQuery({ table, where, output }: MsSqlDeleteConfig): SQL;
    buildUpdateSet(table: MsSqlTable, set: UpdateSet): SQL;
    buildUpdateQuery({ table, set, where, output }: MsSqlUpdateConfig): SQL;
    /**
     * Builds selection SQL with provided fields/expressions
     *
     * Examples:
     *
     * `select <selection> from`
     *
     * `insert ... returning <selection>`
     *
     * If `isSingleTable` is true, then columns won't be prefixed with table name
     */
    private buildSelection;
    private buildSelectionOutput;
    buildSelectQuery({ withList, fields, fieldsFlat, where, having, table, joins, orderBy, groupBy, fetch, for: _for, top, offset, distinct, setOperators, }: MsSqlSelectConfig): SQL;
    buildSetOperations(leftSelect: SQL, setOperators: MsSqlSelectConfig['setOperators']): SQL;
    buildSetOperationQuery({ leftSelect, setOperator: { type, isAll, rightSelect, fetch, orderBy, offset }, }: {
        leftSelect: SQL;
        setOperator: MsSqlSelectConfig['setOperators'][number];
    }): SQL;
    buildInsertQuery({ table, values, output }: MsSqlInsertConfig): SQL;
    sqlToQuery(sql: SQL, invokeSource?: 'indexes' | 'mssql-check' | 'mssql-view-with-schemabinding'): QueryWithTypings;
    buildRelationalQuery({ fullSchema, schema, tableNamesMap, table, tableConfig, queryConfig: config, tableAlias, nestedQueryRelation, joinOn, }: {
        fullSchema: Record<string, unknown>;
        schema: TablesRelationalConfig;
        tableNamesMap: Record<string, string>;
        table: MsSqlTable;
        tableConfig: TableRelationalConfig;
        queryConfig: true | DBQueryConfig<'many', true>;
        tableAlias: string;
        nestedQueryRelation?: Relation;
        joinOn?: SQL;
    }): BuildRelationalQueryResult<MsSqlTable, MsSqlColumn>;
}
