/** * IRExpression → PostgreSQL SQL translator. * * Used by the materialized-views projection to translate computed-property * expressions from the IR into SELECT expressions suitable for * `CREATE MATERIALIZED VIEW` bodies. * * Boundary: the translator emits literal SQL fragments. It does NOT validate * that the resulting SQL is well-formed; it trusts the IR expression tree * and the `views[].columns` overrides supplied by the consumer. * * Unsupported expression kinds produce a diagnostic. The generator collects * diagnostics and emits error-level entries for unsupported forms. */ import type { IRExpression } from '../../ir'; import type { ProjectionDiagnostic } from '../interface'; export interface ExpressionTranslation { sql: string; diagnostics: ProjectionDiagnostic[]; } /** * Translate an IRExpression to a PostgreSQL SELECT expression. * * The `entityName` is used only for diagnostic context. The `columnResolver` * maps a property name (e.g. "amount") to its SQL column name (e.g. "amount") * — this lets the generator apply consumer-supplied column mappings. */ export declare function translateExpression(expr: IRExpression, columnResolver: (propName: string) => string | undefined, entityName: string): ExpressionTranslation; //# sourceMappingURL=expression-to-sql.d.ts.map