@oino-ts/db-mssql 0.20.2 → 0.21.0

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.
@@ -354,7 +354,7 @@ class OINODbMsSql extends db_1.OINODb {
354
354
  result.setError(500, "Exception in validating connection: " + e.message, "OINODbMsSql.validate");
355
355
  common_1.OINOLog.exception("@oino-ts/db-mssql", "OINODbMsSql", "validate", "exception in validate", { message: e.message, stack: e.stack });
356
356
  }
357
- common_1.OINOBenchmark.endMetric("OINODb", "validate");
357
+ common_1.OINOBenchmark.endMetric("OINODb", "validate", result.status != 500);
358
358
  return result;
359
359
  }
360
360
  /**
@@ -385,7 +385,7 @@ class OINODbMsSql extends db_1.OINODb {
385
385
  }
386
386
  common_1.OINOBenchmark.startMetric("OINODb", "sqlSelect");
387
387
  let result = await this._query(sql);
388
- common_1.OINOBenchmark.endMetric("OINODb", "sqlSelect");
388
+ common_1.OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500);
389
389
  return result;
390
390
  }
391
391
  /**
@@ -400,7 +400,7 @@ class OINODbMsSql extends db_1.OINODb {
400
400
  }
401
401
  common_1.OINOBenchmark.startMetric("OINODb", "sqlExec");
402
402
  let result = await this._exec(sql);
403
- common_1.OINOBenchmark.endMetric("OINODb", "sqlExec");
403
+ common_1.OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500);
404
404
  return result;
405
405
  }
406
406
  _getSchemaSql(dbName, tableName) {
@@ -351,7 +351,7 @@ export class OINODbMsSql extends OINODb {
351
351
  result.setError(500, "Exception in validating connection: " + e.message, "OINODbMsSql.validate");
352
352
  OINOLog.exception("@oino-ts/db-mssql", "OINODbMsSql", "validate", "exception in validate", { message: e.message, stack: e.stack });
353
353
  }
354
- OINOBenchmark.endMetric("OINODb", "validate");
354
+ OINOBenchmark.endMetric("OINODb", "validate", result.status != 500);
355
355
  return result;
356
356
  }
357
357
  /**
@@ -382,7 +382,7 @@ export class OINODbMsSql extends OINODb {
382
382
  }
383
383
  OINOBenchmark.startMetric("OINODb", "sqlSelect");
384
384
  let result = await this._query(sql);
385
- OINOBenchmark.endMetric("OINODb", "sqlSelect");
385
+ OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500);
386
386
  return result;
387
387
  }
388
388
  /**
@@ -397,7 +397,7 @@ export class OINODbMsSql extends OINODb {
397
397
  }
398
398
  OINOBenchmark.startMetric("OINODb", "sqlExec");
399
399
  let result = await this._exec(sql);
400
- OINOBenchmark.endMetric("OINODb", "sqlExec");
400
+ OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500);
401
401
  return result;
402
402
  }
403
403
  _getSchemaSql(dbName, tableName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/db-mssql",
3
- "version": "0.20.2",
3
+ "version": "0.21.0",
4
4
  "description": "OINO TS package for using Microsoft Sql databases.",
5
5
  "author": "Matias Kiviniemi (pragmatta)",
6
6
  "license": "MPL-2.0",
@@ -22,7 +22,7 @@
22
22
  "module": "./dist/esm/index.js",
23
23
  "types": "./dist/types/index.d.ts",
24
24
  "dependencies": {
25
- "@oino-ts/db": "0.20.2",
25
+ "@oino-ts/db": "0.21.0",
26
26
  "mssql": "^11.0.1"
27
27
  },
28
28
  "devDependencies": {
@@ -373,7 +373,7 @@ export class OINODbMsSql extends OINODb {
373
373
  result.setError(500, "Exception in validating connection: " + e.message, "OINODbMsSql.validate")
374
374
  OINOLog.exception("@oino-ts/db-mssql", "OINODbMsSql", "validate", "exception in validate", {message:e.message, stack:e.stack})
375
375
  }
376
- OINOBenchmark.endMetric("OINODb", "validate")
376
+ OINOBenchmark.endMetric("OINODb", "validate", result.status != 500)
377
377
  return result
378
378
  }
379
379
 
@@ -406,7 +406,7 @@ export class OINODbMsSql extends OINODb {
406
406
  }
407
407
  OINOBenchmark.startMetric("OINODb", "sqlSelect")
408
408
  let result:OINODbDataSet = await this._query(sql)
409
- OINOBenchmark.endMetric("OINODb", "sqlSelect")
409
+ OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500)
410
410
  return result
411
411
  }
412
412
 
@@ -422,7 +422,7 @@ export class OINODbMsSql extends OINODb {
422
422
  }
423
423
  OINOBenchmark.startMetric("OINODb", "sqlExec")
424
424
  let result:OINODbDataSet = await this._exec(sql)
425
- OINOBenchmark.endMetric("OINODb", "sqlExec")
425
+ OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500)
426
426
  return result
427
427
  }
428
428