/** * Production PostgreSQL Storage Adapter * Enterprise-grade PostgreSQL implementation with connection pooling, transactions, and error handling */ import { PoolConfig } from 'pg'; import { MemoryMetadata } from '../types/index.js'; import { MemoryFilters, StorageAdapter } from './StorageAdapter.js'; export interface PostgreSQLConfig extends PoolConfig { host: string; port: number; database: string; user: string; password: string; ssl?: boolean | object; connectionTimeoutMillis?: number; idleTimeoutMillis?: number; max?: number; min?: number; } /** * Production PostgreSQL storage adapter with enterprise features */ export declare class ProductionPostgreSQLAdapter implements StorageAdapter { private config; private pool; private isInitialized; constructor(config: PostgreSQLConfig); /** * Initialize the adapter and create necessary tables */ initialize(): Promise; /** * Store a memory in PostgreSQL with transaction support */ store(memory: MemoryMetadata): Promise; /** * Retrieve a memory by ID */ retrieve(id: string): Promise; /** * Update memory with optimistic locking */ update(id: string, updates: Partial): Promise; /** * Delete a memory by ID */ delete(id: string): Promise; /** * List memories with advanced filtering and pagination */ list(filters?: MemoryFilters): Promise; /** * Clear memories with optional tenant filtering */ clear(tenantId?: string): Promise; /** * Get memory count with filtering */ getCount(filters?: MemoryFilters): Promise; /** * Perform bulk operations with transaction support */ bulkStore(memories: MemoryMetadata[]): Promise; /** * Close the connection pool */ close(): Promise; /** * Health check for the adapter */ healthCheck(): Promise<{ status: 'healthy' | 'unhealthy'; details: any; }>; /** * Create tables if they don't exist */ private createTablesIfNotExists; /** * Create indexes for better performance */ private createIndexes; /** * Convert database row to MemoryMetadata */ private rowToMemory; } //# sourceMappingURL=ProductionPostgreSQLAdapter.d.ts.map