import type { QueryTranslator } from '@nestjs-crud/core'; import type { CrudRequestOptions } from '@nestjs-crud/core'; import type { CursorPayload } from '@nestjs-crud/core/cursor'; import type { ParsedRequestParams, QuerySort, SCondition } from '@nestjs-crud/request'; import { PrismaClientLike, PrismaQueryTranslatorConfig } from './interfaces'; import { PrismaFetchHelper } from './query/prisma-fetch-helper'; export declare class PrismaQueryTranslator> implements QueryTranslator> { private readonly prisma; private readonly modelName; private readonly config; /** @internal — exposed via executeMany/findOneOrFail for cache-path routing. */ readonly fetchHelper: PrismaFetchHelper; private readonly whereBuilder; private readonly queryComposer; constructor(prisma: PrismaClientLike, modelName: string, config: PrismaQueryTranslatorConfig); buildWhere(search: SCondition): Record | undefined; applyToQuery(q: any, parsed: ParsedRequestParams, options: CrudRequestOptions): any; newQuery(select?: string[]): any; count(q: any): Promise; /** * Execute the composed query through the FetchHelper cache wrap path. * When a `cacheStrategy` is wired (via ctor config or CrudConfigService global), * the result is wrapped in the strategy — cache-hit returns early, cache-miss * executes and sets the result. Bypassed when `?cache=0` or no strategy. */ executeMany(qb: any, parsed: ParsedRequestParams, options: CrudRequestOptions): Promise; /** * Execute a findFirst through the FetchHelper cache wrap path. * Routes through the cache wrap when a strategy is wired and the * request is not bypassed (D-10 + D-11). */ findOneOrFail(qb: any, parsed?: ParsedRequestParams, options?: CrudRequestOptions): Promise; /** Transaction scope-clone hook. */ cloneFor(tx: PrismaClientLike): PrismaQueryTranslator; /** * Apply keyset cursor WHERE + ORDER BY on the Prisma arg-object. Delegates to * the composer which owns the OR-decomposed `where` merge, PK tie-breaker * `orderBy`, and SQLi guard. * * @since 2.2.0 */ applyCursor(query: any, decoded: CursorPayload | null, sort: QuerySort): any; }