import type { AnyEntity, EntityMetadata } from '../typings.js'; /** @internal Stores managed entity instances keyed by their primary key hash, ensuring each row is loaded once. */ export declare class IdentityMap { #private; constructor(defaultSchema?: string); /** Stores an entity in the identity map under its primary key hash. */ store(item: T): void; /** * Stores an entity under an alternate key (non-PK property). * This allows looking up entities by unique properties that are not the primary key. */ storeByKey(item: T, key: string, value: string, schema?: string): void; /** Removes an entity and its alternate key entries from the identity map. */ delete(item: T): void; /** Retrieves an entity by its hash key from the identity map. */ getByHash(meta: EntityMetadata, hash: string): T | undefined; /** Returns (or creates) the per-entity-class store within the identity map. */ getStore(meta: EntityMetadata): Map; clear(): void; /** Returns all entities currently in the identity map. */ values(): AnyEntity[]; [Symbol.iterator](): IterableIterator; /** Returns all hash keys currently in the identity map. */ keys(): string[]; /** * For back compatibility only. */ get(hash: string): T | undefined; private getPkHash; /** * Creates a hash for an alternate key lookup. * Format: `[key]value` or `schema:[key]value` */ getKeyHash(key: string, value: string, schema?: string): string; }