import type { ModelDefinition, RelationConfig } from './types'; /** * Relation key as it can arrive from PostgreSQL. node-pg returns integer * columns as JS numbers and uuid/text columns as strings, so both must be * accepted and compared consistently. */ export type RelationKey = string | number; /** * A batch query plus the metadata needed to fan its rows back out to parents. * * `batchKey` is the column the rows must be grouped on; `isSingle` says whether * a parent takes one row (belongsTo/hasOne) or an array (hasMany). */ export interface BatchLoadConfig { query: { text: string; values: unknown[]; }; batchKey: string; isSingle: boolean; } /** * Build the batch query for a relation, dispatching on its type. * Accepts a pre-resolved relation to avoid redundant lookups. */ export declare function getBatchLoadConfig(model: ModelDefinition, relation: RelationConfig, keys: readonly RelationKey[]): BatchLoadConfig; /** * Generate batch load config for belongsTo relation (public API) */ export declare function batchLoadBelongsTo(model: ModelDefinition, relationName: string, keys: readonly RelationKey[]): BatchLoadConfig; /** * Generate batch load config for hasOne relation (public API) */ export declare function batchLoadHasOne(model: ModelDefinition, relationName: string, keys: readonly RelationKey[]): BatchLoadConfig; /** * Generate batch load config for hasMany relation (public API) */ export declare function batchLoadHasMany(model: ModelDefinition, relationName: string, keys: readonly RelationKey[]): BatchLoadConfig; /** * Generate batch load config for hasManyThrough relation (public API) */ export declare function batchLoadHasManyThrough(model: ModelDefinition, relationName: string, keys: readonly RelationKey[]): BatchLoadConfig; //# sourceMappingURL=batch-load-config.d.ts.map