mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 00:13:57 +00:00
fixed bug with mssql connector
This commit is contained in:
@@ -55,7 +55,7 @@ function extractColumns(columns) {
|
|||||||
/** @type {import('@dbgate/types').EngineDriver} */
|
/** @type {import('@dbgate/types').EngineDriver} */
|
||||||
const driver = {
|
const driver = {
|
||||||
async connect(nativeModules, { server, port, user, password, database }) {
|
async connect(nativeModules, { server, port, user, password, database }) {
|
||||||
const pool = await nativeModules.mssql.connect({
|
const pool = new nativeModules.mssql.ConnectionPool({
|
||||||
server,
|
server,
|
||||||
port,
|
port,
|
||||||
user,
|
user,
|
||||||
@@ -66,6 +66,7 @@ const driver = {
|
|||||||
enableArithAbort: true,
|
enableArithAbort: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
await pool.connect();
|
||||||
pool._nativeModules = nativeModules;
|
pool._nativeModules = nativeModules;
|
||||||
return pool;
|
return pool;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user