refactor: implement database service with strategy pattern
- Add DatabaseService with MockDatabaseStrategy and ProductionDatabaseStrategy - Use strategy pattern to switch between test and production database implementations - Improve type safety and testability of database operations - Update database seeder to use new database service architecture This is the foundation for modernizing the database layer.
This commit is contained in:
@@ -10,11 +10,3 @@ export {
|
||||
export type { DatabaseStrategy } from './types';
|
||||
export { MockDatabaseStrategy } from './MockDatabaseStrategy';
|
||||
export { ProductionDatabaseStrategy } from './ProductionDatabaseStrategy';
|
||||
|
||||
// Legacy compatibility - re-export as dbService for existing code
|
||||
import { databaseService } from './DatabaseService';
|
||||
export { databaseService as dbService };
|
||||
|
||||
// Re-export CouchDBError for backward compatibility
|
||||
import { DatabaseError } from './types';
|
||||
export { DatabaseError as CouchDBError };
|
||||
|
||||
Reference in New Issue
Block a user