File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ exports.init = async (cfg) => {
11
11
config = cfg ;
12
12
} ;
13
13
14
- exports . createPool = async ( poolName ) => {
14
+ exports . createPool = async ( poolName , allowMultiStatements = false ) => {
15
15
try {
16
16
const srcCfg = config . DATASOURCES [ poolName ] ;
17
17
if ( srcCfg ) {
@@ -22,6 +22,7 @@ exports.createPool = async (poolName) => {
22
22
password : srcCfg . DB_PASSWORD ,
23
23
database : srcCfg . DB_DATABASE ,
24
24
port : srcCfg . PORT ,
25
+ multipleStatements : allowMultiStatements ,
25
26
} ) ;
26
27
console . debug ( `MySQL Adapter: Pool ${ poolName } created` ) ;
27
28
return true ;
@@ -35,10 +36,10 @@ exports.createPool = async (poolName) => {
35
36
}
36
37
} ;
37
38
38
- exports . connect = async ( poolName ) => {
39
+ exports . connect = async ( poolName , allowMultiStatements ) => {
39
40
try {
40
41
if ( ! pools [ poolName ] ) {
41
- await this . createPool ( poolName ) ;
42
+ await this . createPool ( poolName , allowMultiStatements ) ;
42
43
}
43
44
return pools [ poolName ] ;
44
45
} catch ( err ) {
You can’t perform that action at this time.
0 commit comments