Skip to content

Commit 35bde56

Browse files
committed
moved multi statements config to var.config
1 parent 4027917 commit 35bde56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports.init = async (cfg) => {
1111
config = cfg;
1212
};
1313

14-
exports.createPool = async (poolName, allowMultiStatements = false) => {
14+
exports.createPool = async (poolName) => {
1515
try {
1616
const srcCfg = config.DATASOURCES[poolName];
1717
if (srcCfg) {
@@ -22,7 +22,7 @@ exports.createPool = async (poolName, allowMultiStatements = false) => {
2222
password: srcCfg.DB_PASSWORD,
2323
database: srcCfg.DB_DATABASE,
2424
port: srcCfg.PORT,
25-
multipleStatements: allowMultiStatements,
25+
multipleStatements: srcCfg.ALLOW_MULTI_STATEMENTS || false,
2626
});
2727
console.debug(`MySQL Adapter: Pool ${poolName} created`);
2828
return true;
@@ -36,10 +36,10 @@ exports.createPool = async (poolName, allowMultiStatements = false) => {
3636
}
3737
};
3838

39-
exports.connect = async (poolName, allowMultiStatements) => {
39+
exports.connect = async (poolName) => {
4040
try {
4141
if (!pools[poolName]) {
42-
await this.createPool(poolName, allowMultiStatements);
42+
await this.createPool(poolName);
4343
}
4444
return pools[poolName];
4545
} catch (err) {

0 commit comments

Comments
 (0)