import type { TableDefinition } from "./table.ts"; import type { MutationValues, QueryJoin, QueryOptions, QueryWhere, UpdateValues } from "./types.ts"; import type { WhereNode } from "./whereBuilder.ts"; declare function quoteIdentifier(identifier: string): string; declare function qualifyColumn(tableName: string, column: string): string; declare function resolveQualifiedColumn(defaultTable: string, columnName: string): string; declare function parseQualifiedColumn(reference: string): { table: string; column: string; }; declare function buildWhereClause(tableName: string, where?: QueryWhere): { clause: string; params: unknown[]; }; declare function buildAdvancedWhereClause(tableName: string, where?: QueryWhere, whereNodes?: readonly WhereNode[], params?: unknown[]): { clause: string; params: unknown[]; }; declare function resolveSoftDeleteColumn(table: TableDefinition): string | null; declare function buildQueryWhereClause(table: TableDefinition, options?: Pick, "where" | "withTrashed" | "onlyTrashed">, whereNodes?: readonly WhereNode[], params?: unknown[]): { clause: string; params: unknown[]; }; declare function buildOrderByClause(tableName: string, orderBy?: QueryOptions["orderBy"]): string; declare function buildJoinClause(joins?: readonly QueryJoin[]): string; declare function buildSelectQuery(table: TableDefinition, options?: QueryOptions, whereNodes?: readonly WhereNode[]): { text: string; params: unknown[]; }; declare function buildCountQuery(table: TableDefinition, where?: QueryWhere, options?: Pick, "withTrashed" | "onlyTrashed" | "joins" | "groupBy">, whereNodes?: readonly WhereNode[]): { text: string; params: unknown[]; }; declare function buildProjectionQuery(table: TableDefinition, expression: string, alias: string, options?: QueryOptions, whereNodes?: readonly WhereNode[]): { text: string; params: unknown[]; }; declare function assertSafeProjectionExpression(expression: string): void; declare function buildGroupedCountQuery(table: TableDefinition, column: K, where?: QueryWhere, options?: Pick, "withTrashed" | "onlyTrashed">): { text: string; params: unknown[]; }; declare function buildInsertQuery(table: TableDefinition, values: MutationValues): { text: string; params: unknown[]; }; declare function buildUpsertQuery(table: TableDefinition, values: MutationValues, conflictColumns: readonly string[], updateColumns?: readonly string[]): { text: string; params: unknown[]; }; declare function buildIncrementQuery(table: TableDefinition, id: TEntity[PrimaryKey], column: keyof TEntity & string, amount: number, extra?: UpdateValues): { text: string; params: unknown[]; }; declare function buildUpdateQuery(table: TableDefinition, id: TEntity[PrimaryKey], changes: UpdateValues): { text: string; params: unknown[]; }; declare function buildSoftDeleteByIdQuery(table: TableDefinition, id: TEntity[PrimaryKey], deletedAt: Date): { text: string; params: unknown[]; }; declare function buildRestoreByIdQuery(table: TableDefinition, id: TEntity[PrimaryKey]): { text: string; params: unknown[]; }; declare function buildDeleteByIdQuery(table: TableDefinition, id: TEntity[PrimaryKey]): { text: string; params: unknown[]; }; export { assertSafeProjectionExpression, buildAdvancedWhereClause, buildCountQuery, buildDeleteByIdQuery, buildGroupedCountQuery, buildIncrementQuery, buildInsertQuery, buildJoinClause, buildOrderByClause, buildProjectionQuery, buildQueryWhereClause, buildRestoreByIdQuery, buildSelectQuery, buildSoftDeleteByIdQuery, buildUpdateQuery, buildUpsertQuery, buildWhereClause, parseQualifiedColumn, qualifyColumn, quoteIdentifier, resolveQualifiedColumn, resolveSoftDeleteColumn, };