import { CompileQueryFn } from './index.js'; import { OrderByOptimizationInfo } from './order-by.js'; import { BasicExpression, JoinClause, QueryIR } from '../ir.js'; import { Collection } from '../../collection/index.js'; import { KeyedStream, NamespacedAndKeyedStream } from '../../types.js'; import { QueryCache, QueryMapping, WindowOptions } from './types.js'; import { CollectionSubscription } from '../../collection/subscription.js'; /** Function type for loading specific keys into a lazy collection */ export type LoadKeysFn = (key: Set) => void; /** Callbacks for managing lazy-loaded collections in optimized joins */ export type LazyCollectionCallbacks = { loadKeys: LoadKeysFn; loadInitialState: () => void; }; /** * Processes all join clauses, applying lazy loading optimizations and maintaining * alias tracking for per-alias subscriptions (enables self-joins). */ export declare function processJoins(pipeline: NamespacedAndKeyedStream, joinClauses: Array, sources: Record, mainCollectionId: string, mainSource: string, allInputs: Record, cache: QueryCache, queryMapping: QueryMapping, collections: Record, subscriptions: Record, callbacks: Record, lazySources: Set, optimizableOrderByCollections: Record, setWindowFn: (windowFn: (options: WindowOptions) => void) => void, rawQuery: QueryIR, onCompileSubquery: CompileQueryFn, aliasToCollectionId: Record, aliasRemapping: Record, sourceWhereClauses: Map>): NamespacedAndKeyedStream;