import type { HydratedRelationDefinition, HydratedRelationDefinitions } from './relationTypes'; /** Public contract for the relationship graph, used in SchemaModel. */ export interface IRelationshipGraph { addRelation(relation: HydratedRelationDefinition): void; findJoinPath(sourceA: string, sourceB: string): HydratedRelationDefinitions | null; findJoinPathRestrictedTo(sourceA: string, sourceB: string, allowedSources: Set): HydratedRelationDefinitions | null; findReachableSources(sourceId: string): Set; } export declare class RelationshipGraph implements IRelationshipGraph { private readonly forward; private readonly reverse; private readonly pathCache; addRelation(relation: HydratedRelationDefinition): void; findJoinPath(sourceA: string, sourceB: string): HydratedRelationDefinitions | null; /** * Find the shortest path from `sourceA` to `sourceB` restricted to nodes in `allowedSources`. * Used by `findConnectedSources` to prefer paths through already-known tables, preventing * the planner from pulling in unrelated intermediate sources via a shorter path * (e.g. avoiding lineitem→supplier→nation when lineitem→orders→customer→nation is the intent). * Returns null if no path exists using only the allowed sources as intermediates. */ findJoinPathRestrictedTo(sourceA: string, sourceB: string, allowedSources: Set): HydratedRelationDefinitions | null; private findPathForKey; findReachableSources(sourceId: string): Set; }