@nattyjs/orm 0.0.1-beta.37 → 0.0.1-beta.39
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/dist/index.cjs +9 -2
- package/dist/index.mjs +9 -2
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -299,8 +299,15 @@ const connectionCacheContainer = new class {
|
|
|
299
299
|
if (this.connectionPoolState[cacheKey])
|
|
300
300
|
return resolve(this.connectionPoolState[cacheKey]);
|
|
301
301
|
const pool = new mssql.ConnectionPool(config);
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
const errorHandler = (error2) => {
|
|
303
|
+
};
|
|
304
|
+
pool.on("error", errorHandler);
|
|
305
|
+
const connection = pool.connect((err) => {
|
|
306
|
+
if (err)
|
|
307
|
+
return error(err);
|
|
308
|
+
this.connectionPoolState[cacheKey] = connection;
|
|
309
|
+
resolve(connection);
|
|
310
|
+
});
|
|
304
311
|
});
|
|
305
312
|
}
|
|
306
313
|
async getPgSqlConnectionPool(sql, config) {
|
package/dist/index.mjs
CHANGED
|
@@ -282,8 +282,15 @@ const connectionCacheContainer = new class {
|
|
|
282
282
|
if (this.connectionPoolState[cacheKey])
|
|
283
283
|
return resolve(this.connectionPoolState[cacheKey]);
|
|
284
284
|
const pool = new mssql.ConnectionPool(config);
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
const errorHandler = (error2) => {
|
|
286
|
+
};
|
|
287
|
+
pool.on("error", errorHandler);
|
|
288
|
+
const connection = pool.connect((err) => {
|
|
289
|
+
if (err)
|
|
290
|
+
return error(err);
|
|
291
|
+
this.connectionPoolState[cacheKey] = connection;
|
|
292
|
+
resolve(connection);
|
|
293
|
+
});
|
|
287
294
|
});
|
|
288
295
|
}
|
|
289
296
|
async getPgSqlConnectionPool(sql, config) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nattyjs/orm",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.39",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"pg": "8.16.0",
|
|
21
21
|
"mssql": "^9.1.1",
|
|
22
|
-
"@nattyjs/core": "0.0.1-beta.
|
|
23
|
-
"@nattyjs/common": "0.0.1-beta.
|
|
24
|
-
"@nattyjs/entity": "0.0.1-beta.
|
|
25
|
-
"@nattyjs/types": "0.0.1-beta.
|
|
22
|
+
"@nattyjs/core": "0.0.1-beta.39",
|
|
23
|
+
"@nattyjs/common": "0.0.1-beta.39",
|
|
24
|
+
"@nattyjs/entity": "0.0.1-beta.39",
|
|
25
|
+
"@nattyjs/types": "0.0.1-beta.39"
|
|
26
26
|
}
|
|
27
27
|
}
|