/** * Ductape Warehouse * * Unified data warehouse interface for cross-database operations * across traditional databases, graphs, and vector stores. * * @example * // Initialize warehouse * const warehouse = new WarehouseService( * databaseService, * graphService, * vectorService, * { env: 'production', product: 'myapp' } * ); * * // Register data sources * await warehouse.registerDatabase('users-postgres'); * await warehouse.registerGraph('social-neo4j'); * await warehouse.registerVector('embeddings-pinecone'); * * // Cross-database query * const result = await warehouse.query({ * operation: 'select', * from: { type: 'database', tag: 'users-postgres', entity: 'users', alias: 'u' }, * fields: ['u.name', 'u.email', 'friends.name as friend_name'], * join: [ * { * type: 'left', * source: { type: 'graph', tag: 'social-neo4j', entity: 'Person', alias: 'friends' }, * graph: { relationship: 'FRIENDS_WITH', direction: 'both' }, * on: { left: 'u.id', right: 'friends.userId' } * } * ], * where: { 'u.status': { $eq: 'active' } }, * limit: 100 * }); * * // Semantic search with database enrichment * const similar = await warehouse.query({ * operation: 'select', * from: { type: 'vector', tag: 'embeddings-pinecone', entity: 'documents', alias: 'v' }, * fields: ['v.id', 'v.score', 'doc.title', 'doc.content'], * join: [ * { * type: 'inner', * source: { type: 'database', tag: 'docs-postgres', entity: 'documents', alias: 'doc' }, * on: { left: 'v.id', right: 'doc.id' } * } * ], * where: { * 'v': { $similar: { vector: queryEmbedding, threshold: 0.8, topK: 10 } } * } * }); * * // Cross-database transaction * const txResult = await warehouse.transaction([ * { * operation: 'insert', * from: { type: 'database', tag: 'orders-postgres', entity: 'orders' }, * data: { userId: 'u1', total: 99.99 } * }, * { * operation: 'insert', * from: { type: 'graph', tag: 'activity-neo4j', entity: 'Event' }, * data: { type: 'ORDER_PLACED', userId: 'u1' } * }, * { * operation: 'upsert', * from: { type: 'vector', tag: 'user-behavior-pinecone', entity: 'behaviors' }, * data: { id: 'u1_order', vector: [...], metadata: { action: 'order' } } * } * ]); */ export { WarehouseService, IWarehouseConfig, IWarehouseContext } from './warehouse.service'; export * from './types'; export { DataSourceRegistry, IRegisteredDataSource, IDataSourceMetadata, IEntitySchema, IFieldSchema, IIndexSchema, IRegistryConfig, } from './registry'; export { QueryParser, QueryValidationError, IQueryAST, IParsedDataSource, IParsedField, IParsedJoin, IParsedWhere, IParsedAggregation, } from './parser'; export { SingleSourceExecutor, ISingleSourceOptions, ISingleSourceResult, JoinExecutor, JoinStrategy, IJoinOptions, SemanticJoinExecutor, ISemanticJoinOptions, ISemanticMatch, } from './executor'; export { SagaOrchestrator, StepExecutor, ISagaOrchestratorOptions } from './transactions';