import type { SQL } from 'drizzle-orm'; import type { PgTableWithColumns } from 'drizzle-orm/pg-core'; import type { Field, Where } from 'mzinga/types'; import { asc, desc } from 'drizzle-orm'; import type { GenericColumn, GenericTable, PostgresAdapter } from '../types'; export type BuildQueryJoins = Record; export type BuildQueryJoinAliases = { condition: SQL; table: GenericTable | PgTableWithColumns; }[]; type BuildQueryArgs = { adapter: PostgresAdapter; fields: Field[]; locale?: string; sort?: string; tableName: string; where: Where; }; type Result = { joinAliases: BuildQueryJoinAliases; joins: BuildQueryJoins; orderBy: { column: GenericColumn; order: typeof asc | typeof desc; }; selectFields: Record; where: SQL; }; declare const buildQuery: ({ adapter, fields, locale, sort, tableName, where: incomingWhere, }: BuildQueryArgs) => Promise; export default buildQuery; //# sourceMappingURL=buildQuery.d.ts.map