import type { NormalizedAggregateQuery, NormalizedCountQuery, NormalizedFindManyQuery, NormalizedGroupByQuery, NormalizedInclude, QueryPredicate } from "../canonical/query-ast.js"; import { PqsSchemaProfileV1 } from "./pqs-schema-profile.js"; import { PqsRelation } from "./pqs-schema-profile.js"; import { type PqsRelationResultShape } from "./pqs-result-shape.js"; export interface CompiledPqsQuery { readonly text: string; readonly values: readonly unknown[]; } export interface CompiledPqsInclude { readonly key: string; readonly expression: string; readonly selection: string; } export interface CompiledContractFindManyQuery extends CompiledPqsQuery { readonly resultShape: PqsRelationResultShape; } export declare function compileCanonicalPhysicalField(relation: PqsRelation, field: string, alias: string, profile: PqsSchemaProfileV1): string; export declare function compileContractFindMany(query: NormalizedFindManyQuery, profile: PqsSchemaProfileV1): CompiledContractFindManyQuery; export declare function compileContractCount(query: NormalizedCountQuery, profile: PqsSchemaProfileV1): CompiledPqsQuery; export declare function compileContractAggregate(query: NormalizedAggregateQuery, profile: PqsSchemaProfileV1): CompiledPqsQuery; export declare function compileCanonicalPhysicalIncludes(source: PqsRelation, parentAlias: string, includes: readonly NormalizedInclude[], profile: PqsSchemaProfileV1, add: (value: unknown) => string): readonly CompiledPqsInclude[]; export declare function compileCanonicalPhysicalPredicate(relation: PqsRelation, predicate: QueryPredicate, alias: string, profile: PqsSchemaProfileV1, add: (value: unknown) => string): string; export declare function compileContractGroupBy(query: NormalizedGroupByQuery, profile: PqsSchemaProfileV1): CompiledPqsQuery;