export interface SqlDialectEscapeRules { /** Character that delimits string literals. Standard SQL uses a single quote. */ readonly stringQuoteChar: string; /** * When `true`, a quote inside a literal is escaped by doubling it (`''`). * Every standards-tracking engine supports this, so it is the safe default. */ readonly doubleQuoteToEscape: boolean; /** * When `true`, the backslash is an escape character inside string literals and * a literal backslash must be doubled (`\\`). MySQL behaves this way; Presto, * Trino and standard SQL do NOT. */ readonly escapeBackslash: boolean; /** Character that delimits identifiers (`"` for standard SQL, `` ` `` for MySQL). */ readonly identifierQuoteChar: string; } /** * Escaping dialect of the target engine: * - `ansi` — standard SQL: Presto, Trino, Athena, Dremio, ksqlDB, Pinot, ... * - `mysql` — MySQL / MariaDB: quotes doubled, backslash is an escape char * - `spark` — Spark SQL / Hive / Databricks: backslash escapes only */ export type EscapeDialect = 'ansi' | 'mysql' | 'spark'; /** * Format a query for the given engine dialect: `?` -> escaped value, * `??` -> escaped identifier. */ export declare function format(dialect: EscapeDialect, sql: string, values?: unknown): string; /** * Format a query for standard-SQL engines (Presto, Trino, Postgres, ...): * `?` -> escaped value, `??` -> escaped identifier. */ export declare function formatAnsi(sql: string, values?: unknown): string; /** * Format a query for MySQL / MariaDB: `?` -> escaped value, `??` -> escaped * identifier. */ export declare function formatMySql(sql: string, values?: unknown): string; /** * Format a query for Spark SQL / Hive / Databricks: `?` -> escaped value, * `??` -> escaped identifier. */ export declare function formatSparkSql(sql: string, values?: unknown): string; export declare function escapeStringLiteral(value: string): string; //# sourceMappingURL=sql-escape.d.ts.map