mythix-orm-postgresql 1.11.3 → 1.12.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.
@@ -11,7 +11,7 @@ const { Literals, Errors } = require('mythix-orm');
11
11
  const { SQLConnectionBase } = require('mythix-orm-sql-base');
12
12
  const PostgreSQLQueryGenerator = require('./postgresql-query-generator');
13
13
 
14
- const DEFAULT_TIMEOUT_MS = 15000;
14
+ const DEFAULT_TIMEOUT_MS = 30000;
15
15
 
16
16
  function sleep(ms) {
17
17
  return new Promise((resolve) => {
@@ -320,7 +320,7 @@ class PostgreSQLConnection extends SQLConnectionBase {
320
320
  /// Return: any
321
321
  /// Return the result of the provided `callback`.
322
322
  async transaction(callback, _options, _retryCount) {
323
- let options = _options || {};
323
+ let options = { ...(this.getOptions() || {}), ...(_options || {}) };
324
324
  let inheritedThis = Object.create(options.connection || this.getContextValue('connection', this));
325
325
  let lockMode = inheritedThis.getLockMode(options.lock);
326
326
  let savePointName;
@@ -371,6 +371,9 @@ class PostgreSQLConnection extends SQLConnectionBase {
371
371
  }
372
372
  }
373
373
 
374
+ if (options.logger)
375
+ options.logger.error(error);
376
+
374
377
  await client.release();
375
378
  throw error;
376
379
  }
@@ -399,6 +402,9 @@ class PostgreSQLConnection extends SQLConnectionBase {
399
402
  else
400
403
  await inheritedThis.query('ROLLBACK', options, client);
401
404
 
405
+ if (options.logger)
406
+ options.logger.error(error);
407
+
402
408
  throw error;
403
409
  } finally {
404
410
  if (!savePointName && client)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mythix-orm-postgresql",
3
- "version": "1.11.3",
3
+ "version": "1.12.0",
4
4
  "description": "PostgreSQL driver for Mythix ORM",
5
5
  "main": "lib/index.js",
6
6
  "type": "commonjs",
@@ -33,11 +33,11 @@
33
33
  },
34
34
  "homepage": "https://github.com/th317erd/mythix-orm-postgresql#readme",
35
35
  "peerDependencies": {
36
- "mythix-orm": "^1.13.2",
37
- "mythix-orm-sql-base": "^1.11.1"
36
+ "mythix-orm": "^1.14.0",
37
+ "mythix-orm-sql-base": "^1.12.0"
38
38
  },
39
39
  "dependencies": {
40
- "luxon": "^3.1.0",
40
+ "luxon": "^3.2.1",
41
41
  "nife": "^1.12.1",
42
42
  "pg": "^8.8.0",
43
43
  "pg-format": "^1.0.4",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@spothero/eslint-plugin-spothero": "github:spothero/eslint-plugin-spothero",
48
- "eslint": "^8.28.0",
48
+ "eslint": "^8.31.0",
49
49
  "jasmine": "^4.5.0",
50
50
  "nyc": "^15.1.0"
51
51
  },