slim-node-mysql
Version:
MySQL database class to abstract pooling and prepared statements
17 lines • 812 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectionStringParserStrategy = void 0;
const ConnectionStringParseError_1 = require("../errors/ConnectionStringParseError");
const MySQLConnectionStringParser_1 = require("./MySQLConnectionStringParser");
class ConnectionStringParserStrategy {
static getParserStrategy(connectionString) {
if (connectionString.startsWith('mysql://')) {
return new MySQLConnectionStringParser_1.MySQLConnectionStringParser();
}
else {
throw new ConnectionStringParseError_1.ConnectionStringParseError('No parser for connection string type');
}
}
}
exports.ConnectionStringParserStrategy = ConnectionStringParserStrategy;
//# sourceMappingURL=ConnectionStringParserStrategy.js.map
;