import type { Where } from 'payload'; /** * Query parameters map for ClickHouse parameterized queries */ export type QueryParams = Record; /** * Result of building a parameterized query */ export interface ParameterizedQuery { params: QueryParams; sql: string; } /** * QueryBuilder creates parameterized SQL queries for ClickHouse * Uses {param:Type} syntax for safe parameter binding */ export declare class QueryBuilder { private paramCounter; private params; /** * Apply an operator to a field */ private applyOperator; /** * Recursively build conditions from a where object */ private buildConditions; /** * Build conditions for a single field with operators */ private buildFieldConditions; /** * Get the ClickHouse field path for a Payload field */ private getFieldPath; /** * Add a parameter for datetime comparison, converting ISO strings to DateTime64 * for datetime columns (createdAt, updatedAt, deletedAt, v) */ addDatetimeParam(field: string, value: unknown): string; /** * Add a named parameter (for reuse) */ addNamedParam(name: string, value: unknown): string; /** * Add a parameter and return its placeholder */ addParam(value: unknown, type?: 'Float64' | 'Int64' | 'String' | 'UInt8'): string; /** * Add a timestamp parameter (milliseconds since epoch) */ addTimestamp(ms: number): string; /** * Build the base WHERE clause for collection queries */ buildBaseWhere(ns: string, type: string): string; /** * Build base WHERE without deletedAt filter (for use inside subqueries) */ buildBaseWhereNoDeleted(ns: string, type: string): string; /** * Build WHERE clause from Payload's where condition */ buildWhereClause(where: undefined | Where): string; /** * Get all collected parameters */ getParams(): QueryParams; } /** * Combine base WHERE with additional conditions */ export declare function combineWhere(baseWhere: string, additionalWhere: string): string; //# sourceMappingURL=QueryBuilder.d.ts.map