/** * SQL Dialect abstraction for cross-database semantic query generation. * * Each database has different syntax for date truncation, identifier quoting, * type casting, etc. This module provides a uniform interface so that * SemanticLayer.composeQuery() generates portable SQL. */ export interface SQLDialect { /** Driver name(s) this dialect covers. */ readonly name: string; /** Truncate a date/timestamp column to a given granularity. */ dateTrunc(granularity: string, columnSql: string): string; /** Quote an identifier (table/column name). */ quoteIdentifier(name: string): string; /** CURRENT_TIMESTAMP expression. */ currentTimestamp(): string; /** Cast an expression to DATE type. */ castToDate(expr: string): string; /** LIMIT N clause (some dialects use TOP N instead). */ limitClause(n: number): string; /** Whether LIMIT goes at the end (true) or must use TOP (false). */ readonly limitAtEnd: boolean; /** String concatenation for two expressions. */ concat(a: string, b: string): string; /** ILIKE or case-insensitive LIKE equivalent. */ ilike(column: string, pattern: string): string; } /** * Get the SQL dialect for a given driver name. * Falls back to DuckDB dialect if the driver is unknown. */ export declare function getDialect(driver?: string): SQLDialect; /** * List all supported dialect driver names. */ export declare function listDialectDrivers(): string[]; /** * A concise, human-readable SQL-conventions block for the generation prompt, so * the model writes dialect-correct SQL (quoting, row-limiting, date functions) * instead of a DuckDB/Postgres default that then fails on Snowflake/BigQuery/etc. * Every example is derived from the real dialect object, so it can never drift * from what the semantic composer emits. */ export declare function describeDialectForPrompt(driver?: string): string; //# sourceMappingURL=sql-dialect.d.ts.map