import type { SQLParserDialect } from '@memberjunction/sql-dialect'; /** * Symbol table for managing CTE names during composition. * * Guarantees uniqueness at CTE creation time — name collisions become * impossible by construction. * * All name comparisons are case-insensitive (SQL Server and PostgreSQL * both treat unquoted identifiers case-insensitively for CTEs). */ export declare class SymbolTable { /** Allocated names (canonical lowercase → original casing) */ private allocatedNames; /** Dialect for identifier quoting */ private dialect; constructor(dialect: SQLParserDialect); /** * Registers a name. If the name is already taken, generates a unique * suffix (`Name__2`, `Name__3`, ...) and returns the suffixed version. * * @param desiredName - The preferred name (unquoted) * @returns The actual allocated name (may be suffixed if collision) */ Register(desiredName: string): string; /** * Pre-seeds the table with names that are already taken (e.g., outer CTE names). */ Seed(name: string): void; /** * Checks if a name (case-insensitive) is already allocated. */ Has(name: string): boolean; /** * Returns the dialect-quoted form of a name via `dialect.QuoteIdentifier()`. */ Quote(name: string): string; /** * Generates a composition CTE name from a query name + hash, registers it, * and returns the quoted form. */ RegisterCompositionCTE(queryName: string, hashInput: string): string; /** * Returns the current count of allocated names. */ get Size(): number; } //# sourceMappingURL=symbolTable.d.ts.map