import type { PaginatedResult } from "../pagination/index.ts"; import type BaseRepository from "./baseRepository.ts"; import type { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, MorphManyRelation, MorphOneRelation, MorphToRelation } from "./relationships.ts"; import type { QueryOptions, QueryWhere } from "./types.ts"; import { WhereBuilder } from "./whereBuilder.ts"; type LoadedRow = Record; declare class RepositoryQuery { private readonly repository; private whereClause; private queryOptions; private readonly eagerLoads; private readonly whereNodes; constructor(repository: BaseRepository, whereClause?: QueryWhere, queryOptions?: Omit, "where">); where(input: QueryWhere | ((builder: WhereBuilder) => void)): this; orWhere(input: QueryWhere | ((builder: WhereBuilder) => void)): this; orderBy(orderBy: QueryOptions["orderBy"]): this; limit(limit: number): this; whereNull(column: keyof TEntity & string): this; whereNotNull(column: keyof TEntity & string): this; whereNotIn(column: keyof TEntity & string, values: readonly unknown[]): this; withSubqueryCount(alias: string, sql: string, params?: readonly unknown[]): this; whereIn(column: keyof TEntity & string, values: readonly unknown[]): this; whereExists(sql: string, params?: readonly unknown[]): this; whereNotExists(sql: string, params?: readonly unknown[]): this; offset(offset: number): this; join(left: `${string}.${string}`, right: `${string}.${string}`): this; leftJoin(left: `${string}.${string}`, right: `${string}.${string}`): this; groupBy(groupBy: QueryOptions["groupBy"]): this; having(having: QueryWhere): this; withHasMany(as: Alias, relation: HasManyRelation, childRepository: BaseRepository, options?: Omit, "where">): this; withBelongsTo(as: Alias, relation: BelongsToRelation, parentRepository: BaseRepository, options?: Omit, "where">): this; withMorphMany(as: Alias, relation: MorphManyRelation, childRepository: BaseRepository, options?: Omit, "where">): this; withMorphOne(as: Alias, relation: MorphOneRelation, childRepository: BaseRepository, options?: Omit, "where">): this; withMorphTo(as: Alias, relation: MorphToRelation, repositoriesByType: ReadonlyMap>, options?: Omit, "where">): this; withBelongsToMany(as: Alias, relation: BelongsToManyRelation, relatedRepository: BaseRepository, options?: Omit, "where">): this; withHasManyThrough(as: Alias, relation: HasManyThroughRelation, farRepository: BaseRepository, options?: Omit, "where">): this; withTrashed(): this; onlyTrashed(): this; get(): Promise>; first(): Promise<(TEntity & LoadedRow) | null>; count(): Promise; pluck(column: K): Promise>; pluck(column: K, keyBy: KK): Promise>; value(column: K): Promise; attachToRows(rows: readonly TEntity[]): Promise>; paginate(options: { page: number; perPage: number; }): Promise>; private buildOptions; private addJoin; private attach; private hydrateEagerLoad; } export { projectPluck, uniqueColumnSelect } from "./pluck.ts"; export { RepositoryQuery };