import { DirectRelation, DirectRelationMap, SourceRecord, ThroughRelation, ThroughRelationMap } from "../types.js"; /** * Builds a map from foreign key values to parent objects. * * Useful for indexing related records by a specified field. * * @param data - Array of objects to index. * @param foreignKeyPath - Dot-notated path to the key field. * @returns A map of key to array of matching objects. */ export declare function buildForeignKeyMap(data: SourceRecord[], foreignKeyPath: string): Map; /** * Finds map entries whose keys partially match a keyword. * * @param map - A map to search. * @param keyword - Keyword to match. * @param options - Optional case-insensitive matching. * @returns Matching values. */ export declare function findEntriesByPartialKey(map: Map, keyword: string, options?: { caseInsensitive?: boolean; }): V[]; /** * Resolves a direct relation (e.g., hasOne, hasMany) for a given row. * * @param row - The source object. * @param rel - Relation metadata (including localKey and foreignKey). * @param foreignData - The target dataset to match against. * @param foreignMapOpt - (optional) Pre-built foreign key map for performance. * @returns Related object(s) or null. */ export declare function resolveDirectRelation(row: any, rel: DirectRelation, foreignData: SourceRecord[], foreignMapOpt?: DirectRelationMap["foreignMap"]): SourceRecord | SourceRecord[] | null; /** * Resolves a through-relation (e.g., hasOneThrough, hasManyThrough). * * @param row - The source object. * @param rel - Relation metadata including through and target keys. * @param throughData - The intermediate dataset. * @param targetData - The final related dataset. * @param targetMapOpt - (optional) Pre-built target key map for performance. * @returns Related object(s) or null. */ export declare function resolveThroughRelation(row: any, rel: ThroughRelation, throughData: SourceRecord[], targetData: SourceRecord[], targetMapOpt?: ThroughRelationMap["targetMap"], throughMapOpt?: ThroughRelationMap["targetMap"]): SourceRecord | SourceRecord[] | null;