/** * SQL Tagged Template Literal * * Marks a string as a SQL expression rather than a column reference. * Used to distinguish between: * - Simple column: 'region' (string) * - SQL expression: sql`DATE(created_at)` (SQLExpression) * * @example * ```typescript * dimensions: { * region: 'region', // Simple column reference * date: sql`DATE(created_at)`, // SQL expression * hour: sql`toHour(created_at)` // SQL expression * } * ``` */ /** * Represents a SQL expression with metadata */ export interface SQLExpression { readonly __brand: 'SQLExpression'; readonly sql: string; readonly raw: boolean; } /** * Tagged template literal for SQL expressions * * @param strings - Template string array * @param values - Interpolated values * @returns SQLExpression object */ export declare function sql(strings: TemplateStringsArray, ...values: unknown[]): SQLExpression; /** * Type guard to check if a value is a SQLExpression * * @param value - Value to check * @returns True if value is a SQLExpression */ export declare function isSQLExpression(value: unknown): value is SQLExpression; /** * Convert a value to a SQL string * - If it's a SQLExpression, return the sql property * - If it's a string, return it as-is (assumed to be a column name) * - Otherwise, throw an error * * @param value - Value to convert * @returns SQL string */ export declare function toSQLString(value: string | SQLExpression): string; //# sourceMappingURL=sql-tag.d.ts.map