/** * Single Source Executor * * Executes queries against a single data source by routing to the appropriate * underlying service (DatabaseService, GraphService, or VectorService). */ import { DatabaseService } from '../../database/databases.service'; import { GraphService } from '../../graph/graphs.service'; import { VectorDatabaseService } from '../../vector/vector-database.service'; import { IWarehouseQuery, IDataSource, IUnifiedWhereClause, ISourceStats } from '../types'; import { DataSourceRegistry } from '../registry'; /** * Options for single-source execution */ export interface ISingleSourceOptions { /** Environment override */ env?: string; /** Product override */ product?: string; /** Timeout in milliseconds */ timeout?: number; } /** * Result from single-source execution */ export interface ISingleSourceResult> { /** Result data */ data: T[]; /** Row count */ count?: number; /** Affected rows (for writes) */ affectedRows?: number; /** Source statistics */ stats: ISourceStats; } /** * Single Source Executor * * Routes warehouse queries to the appropriate underlying service and * normalizes the results. */ export declare class SingleSourceExecutor { private readonly registry; private readonly databaseService; private readonly graphService; private readonly vectorService; constructor(registry: DataSourceRegistry, databaseService: DatabaseService, graphService: GraphService, vectorService: VectorDatabaseService); /** * Execute a query against a single data source */ execute>(query: IWarehouseQuery, source: IDataSource, options?: ISingleSourceOptions): Promise>; /** * Execute a select query and return just the data */ select>(source: IDataSource, options: { fields?: string[]; where?: IUnifiedWhereClause; orderBy?: { field: string; order: 'ASC' | 'DESC'; }[]; limit?: number; offset?: number; env?: string; product?: string; }): Promise; /** * Execute query against a database */ private executeDatabase; /** * Execute database SELECT */ private executeDatabaseSelect; /** * Execute database INSERT */ private executeDatabaseInsert; /** * Execute database UPDATE */ private executeDatabaseUpdate; /** * Execute database DELETE */ private executeDatabaseDelete; /** * Execute database UPSERT */ private executeDatabaseUpsert; /** * Execute query against a graph database */ private executeGraph; /** * Execute graph SELECT (find nodes) */ private executeGraphSelect; /** * Execute graph INSERT (create node) */ private executeGraphInsert; /** * Execute graph UPDATE */ private executeGraphUpdate; /** * Execute graph DELETE */ private executeGraphDelete; /** * Execute query against a vector store */ private executeVector; /** * Execute vector SELECT (similarity search or fetch) */ private executeVectorSelect; /** * Execute vector UPSERT */ private executeVectorUpsert; /** * Execute vector DELETE */ private executeVectorDelete; /** * Strip alias prefix from a field path */ private stripAliasPrefix; /** * Convert unified where clause to database format */ private convertWhereForDatabase; /** * Convert unified where clause to graph format */ private convertWhereForGraph; /** * Convert unified where clause to vector metadata filter */ private convertWhereForVectorMetadata; /** * Extract vector similarity condition from where clause */ private extractVectorCondition; /** * Extract IDs condition from where clause */ private extractIdsCondition; /** * Extract metadata from a data object (exclude known vector fields) */ private extractMetadata; }