@pi-r/mssql 0.2.2 → 0.3.1

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.
Files changed (2) hide show
  1. package/client/index.js +6 -5
  2. package/package.json +3 -3
package/client/index.js CHANGED
@@ -132,9 +132,10 @@ function setCredential(item) {
132
132
  ({ username, password, hostname, port, database } = (0, util_1.parseServerAuth)(credential, true));
133
133
  }
134
134
  else {
135
+ const uri = item.uri;
135
136
  credential = {};
136
- if (item.uri) {
137
- const connection = (0, util_1.parseConnectionString)(item.uri);
137
+ if (uri) {
138
+ const connection = (0, util_1.parseConnectionString)(uri);
138
139
  if (connection) {
139
140
  ({ username, password, hostname, port, database } = connection);
140
141
  }
@@ -392,8 +393,8 @@ async function executeBatchQuery(batch, options = '', outResult) {
392
393
  else {
393
394
  this.add(item, 4 /* DB_TRANSACTION.COMMIT */);
394
395
  if (output) {
395
- output['__recordset__'] = 0;
396
- output['__returnvalue__'] = true;
396
+ output.__recordset__ = 0;
397
+ output.__returnvalue__ = true;
397
398
  rows.push([output]);
398
399
  }
399
400
  resolve(!error ? this.setQueryResult(source, credential, queryString, rows, cacheValue) : rows);
@@ -420,7 +421,7 @@ async function executeBatchQuery(batch, options = '', outResult) {
420
421
  try {
421
422
  const items = JSON.parse(data.value);
422
423
  if ((0, types_1.isArray)(items)) {
423
- items.forEach((col) => col['__recordset__'] = recordset);
424
+ items.forEach((col) => col.__recordset__ = recordset);
424
425
  rows.push(...items);
425
426
  }
426
427
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mssql",
3
- "version": "0.2.2",
3
+ "version": "0.3.1",
4
4
  "description": "MSSQL client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@e-mc/db": "^0.5.3",
25
25
  "@e-mc/types": "^0.5.3",
26
- "tedious": "^15.1.3",
27
- "tedious-connection-pool": "^1.0.5"
26
+ "tedious": "^16.2.0",
27
+ "tedious-connection-pool2": "^2.1.0"
28
28
  }
29
29
  }