queryforge
Version:
A powerful, type-safe SQL query builder for Node.js with support for MySQL, PostgreSQL, and SQLite. Features fluent API, transaction management, and connection pooling.
22 lines • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectionManagerFactory = void 0;
const MySQLConnectionManager_1 = require("./MySQLConnectionManager");
const PostgreSQLConnectionManager_1 = require("./PostgreSQLConnectionManager");
const SQLiteConnectionManager_1 = require("./SQLiteConnectionManager");
class ConnectionManagerFactory {
static create(config) {
switch (config.type) {
case 'mysql':
return new MySQLConnectionManager_1.MySQLConnectionManager(config);
case 'postgresql':
return new PostgreSQLConnectionManager_1.PostgreSQLConnectionManager(config);
case 'sqlite':
return new SQLiteConnectionManager_1.SQLiteConnectionManager(config);
default:
throw new Error(`Unsupported database type: ${config.type}`);
}
}
}
exports.ConnectionManagerFactory = ConnectionManagerFactory;
//# sourceMappingURL=ConnectionManagerFactory.js.map