@oino-ts/db-postgresql 0.20.2 → 0.21.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.
@@ -311,7 +311,7 @@ class OINODbPostgresql extends db_1.OINODb {
311
311
  result.setError(500, "Exception validating connection: " + e.message, "OINODbPostgresql.validate");
312
312
  common_1.OINOLog.exception("@oino-ts/db-postgresql", "OINODbPostgresql", "validate", "exception in validate", { message: e.message, stack: e.stack });
313
313
  }
314
- common_1.OINOBenchmark.endMetric("OINODb", "validate");
314
+ common_1.OINOBenchmark.endMetric("OINODb", "validate", result.status != 500);
315
315
  return result;
316
316
  }
317
317
  /**
@@ -339,7 +339,7 @@ class OINODbPostgresql extends db_1.OINODb {
339
339
  }
340
340
  common_1.OINOBenchmark.startMetric("OINODb", "sqlSelect");
341
341
  let result = await this._query(sql);
342
- common_1.OINOBenchmark.endMetric("OINODb", "sqlSelect");
342
+ common_1.OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500);
343
343
  return result;
344
344
  }
345
345
  /**
@@ -354,7 +354,7 @@ class OINODbPostgresql extends db_1.OINODb {
354
354
  }
355
355
  common_1.OINOBenchmark.startMetric("OINODb", "sqlExec");
356
356
  let result = await this._exec(sql);
357
- common_1.OINOBenchmark.endMetric("OINODb", "sqlExec");
357
+ common_1.OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500);
358
358
  return result;
359
359
  }
360
360
  _getSchemaSql(dbName, tableName) {
@@ -308,7 +308,7 @@ export class OINODbPostgresql extends OINODb {
308
308
  result.setError(500, "Exception validating connection: " + e.message, "OINODbPostgresql.validate");
309
309
  OINOLog.exception("@oino-ts/db-postgresql", "OINODbPostgresql", "validate", "exception in validate", { message: e.message, stack: e.stack });
310
310
  }
311
- OINOBenchmark.endMetric("OINODb", "validate");
311
+ OINOBenchmark.endMetric("OINODb", "validate", result.status != 500);
312
312
  return result;
313
313
  }
314
314
  /**
@@ -336,7 +336,7 @@ export class OINODbPostgresql extends OINODb {
336
336
  }
337
337
  OINOBenchmark.startMetric("OINODb", "sqlSelect");
338
338
  let result = await this._query(sql);
339
- OINOBenchmark.endMetric("OINODb", "sqlSelect");
339
+ OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500);
340
340
  return result;
341
341
  }
342
342
  /**
@@ -351,7 +351,7 @@ export class OINODbPostgresql extends OINODb {
351
351
  }
352
352
  OINOBenchmark.startMetric("OINODb", "sqlExec");
353
353
  let result = await this._exec(sql);
354
- OINOBenchmark.endMetric("OINODb", "sqlExec");
354
+ OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500);
355
355
  return result;
356
356
  }
357
357
  _getSchemaSql(dbName, tableName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/db-postgresql",
3
- "version": "0.20.2",
3
+ "version": "0.21.1",
4
4
  "description": "OINO TS package for using Postgresql databases.",
5
5
  "author": "Matias Kiviniemi (pragmatta)",
6
6
  "license": "MPL-2.0",
@@ -20,7 +20,7 @@
20
20
  "module": "./dist/esm/index.js",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "dependencies": {
23
- "@oino-ts/db": "0.20.2",
23
+ "@oino-ts/db": "0.21.1",
24
24
  "pg": "^8.11.3"
25
25
  },
26
26
  "devDependencies": {
@@ -321,7 +321,7 @@ export class OINODbPostgresql extends OINODb {
321
321
  result.setError(500, "Exception validating connection: " + e.message, "OINODbPostgresql.validate")
322
322
  OINOLog.exception("@oino-ts/db-postgresql", "OINODbPostgresql", "validate", "exception in validate", {message:e.message, stack:e.stack})
323
323
  }
324
- OINOBenchmark.endMetric("OINODb", "validate")
324
+ OINOBenchmark.endMetric("OINODb", "validate", result.status != 500)
325
325
  return result
326
326
  }
327
327
 
@@ -352,7 +352,7 @@ export class OINODbPostgresql extends OINODb {
352
352
  }
353
353
  OINOBenchmark.startMetric("OINODb", "sqlSelect")
354
354
  let result:OINODbDataSet = await this._query(sql)
355
- OINOBenchmark.endMetric("OINODb", "sqlSelect")
355
+ OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500)
356
356
  return result
357
357
  }
358
358
 
@@ -368,7 +368,7 @@ export class OINODbPostgresql extends OINODb {
368
368
  }
369
369
  OINOBenchmark.startMetric("OINODb", "sqlExec")
370
370
  let result:OINODbDataSet = await this._exec(sql)
371
- OINOBenchmark.endMetric("OINODb", "sqlExec")
371
+ OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500)
372
372
  return result
373
373
  }
374
374