import { Placeholder, SQL, SQLWrapper, Table } from 'drizzle-orm'; import { EntityClass } from './decorator/entity'; import type { Drizzle, Executable } from './drizzle'; import { SelectedFields } from './types'; export type From = Table | SQLWrapper; export type JoinType = 'left' | 'right' | 'inner'; export interface Query extends Executable { where(where?: SQL): this; orderBy(...items: SQL[]): this; offset(offset: number | Placeholder): this; limit(limit: number | Placeholder): this; } export type QueryConfig = { fields: SelectedFields; where?: SQL; limit?: number | Placeholder; offset?: number | Placeholder; orderBy?: SQLWrapper[]; }; export type QuerySession = { count(sql: SQL): Promise; }; export type QueryResultOf = T extends Query ? P : never; export declare function createQuery(clz: EntityClass, dataSource?: Drizzle | string): Query; //# sourceMappingURL=query.d.ts.map