rads-db 3.2.14 → 3.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/drivers/sql.cjs +3 -2
- package/drivers/sql.mjs +3 -2
- package/package.json +1 -1
package/drivers/sql.cjs
CHANGED
|
@@ -377,6 +377,7 @@ ${insertQuery.slice(0, 300)}...`);
|
|
|
377
377
|
await client.query(`delete from ${entity}`);
|
|
378
378
|
return [];
|
|
379
379
|
},
|
|
380
|
+
ensureClientConnected,
|
|
380
381
|
/** Generates migration script for this one entity */
|
|
381
382
|
async generateMigrationScript() {
|
|
382
383
|
await ensureIntrospectionIsAvailable();
|
|
@@ -720,12 +721,12 @@ END;
|
|
|
720
721
|
await clientPromise;
|
|
721
722
|
}
|
|
722
723
|
async function ensureClientConnectedInner() {
|
|
723
|
-
client = await _mssql.default.
|
|
724
|
+
client = await new _mssql.default.ConnectionPool({
|
|
724
725
|
authentication: options.authentication,
|
|
725
726
|
server: options.server,
|
|
726
727
|
database: options.database,
|
|
727
728
|
...options.options
|
|
728
|
-
});
|
|
729
|
+
}).connect();
|
|
729
730
|
}
|
|
730
731
|
};
|
|
731
732
|
module.exports = _default;
|
package/drivers/sql.mjs
CHANGED
|
@@ -248,6 +248,7 @@ ${insertQuery.slice(0, 300)}...`);
|
|
|
248
248
|
await client.query(`delete from ${entity}`);
|
|
249
249
|
return [];
|
|
250
250
|
},
|
|
251
|
+
ensureClientConnected,
|
|
251
252
|
/** Generates migration script for this one entity */
|
|
252
253
|
async generateMigrationScript() {
|
|
253
254
|
await ensureIntrospectionIsAvailable();
|
|
@@ -596,12 +597,12 @@ END;
|
|
|
596
597
|
await clientPromise;
|
|
597
598
|
}
|
|
598
599
|
async function ensureClientConnectedInner() {
|
|
599
|
-
client = await sql.
|
|
600
|
+
client = await new sql.ConnectionPool({
|
|
600
601
|
authentication: options.authentication,
|
|
601
602
|
server: options.server,
|
|
602
603
|
database: options.database,
|
|
603
604
|
...options.options
|
|
604
|
-
});
|
|
605
|
+
}).connect();
|
|
605
606
|
}
|
|
606
607
|
};
|
|
607
608
|
function stringifyValueForInsert(value) {
|