/** * @nahisaho/musubix-codegraph - Memory Storage Implementation * * In-memory storage adapter for CodeGraph * * @see REQ-CG-API-005 * @see DES-CG-006 * @see TSK-CG-051 */ import type { StorageAdapter, StorageStats, Entity, Relation, GraphQuery, RelationType } from '../types.js'; /** * In-memory storage adapter * * Stores entities and relations in memory using Maps. * Suitable for testing and small codebases. * * @example * ```typescript * const storage = new MemoryStorage(); * await storage.initialize(); * * await storage.saveEntity(entity); * const retrieved = await storage.getEntity(entity.id); * ``` */ export declare class MemoryStorage implements StorageAdapter { private entities; private relations; private relationsBySource; private relationsByTarget; private fileCount; private initialized; /** * Initialize the storage */ initialize(): Promise; /** * Close the storage and release resources */ close(): Promise; /** * Save an entity */ saveEntity(entity: Entity): Promise; /** * Get an entity by ID */ getEntity(id: string): Promise; /** * Query entities */ queryEntities(query: GraphQuery): Promise; /** * Delete an entity */ deleteEntity(id: string): Promise; /** * Save a relation */ saveRelation(relation: Relation): Promise; /** * Get relations for an entity */ getRelations(entityId: string, direction?: 'in' | 'out' | 'both'): Promise; /** * Delete a relation */ deleteRelation(id: string): Promise; /** * Bulk save entities and relations */ bulkSave(entities: Entity[], relations: Relation[]): Promise; /** * Clear all data */ clear(): Promise; /** * Get storage statistics */ getStats(): Promise; /** * Find entities by name pattern */ findByName(name: string, exact?: boolean): Promise; /** * Get all entities of a specific type */ getEntitiesByType(type: Entity['type']): Promise; /** * Get relations by type */ getRelationsByType(type: RelationType): Promise; /** * Get all file paths */ getFilePaths(): Promise; /** * Check if storage is initialized */ isInitialized(): boolean; } //# sourceMappingURL=memory-storage.d.ts.map