@trenskow/pged 5.1.71 → 5.1.72

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/lib/index.js +4 -5
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -47,9 +47,8 @@ export default class PGed extends EventEmitter {
47
47
  options.casing.js = options.casing.hs || 'camel';
48
48
 
49
49
  options.connection = options.connection || {};
50
- options.connection.retry = options.connection.retry || {};
51
- options.connection.retry.count = options.connection.retry.count || 1;
52
- options.connection.retry.delay = options.connection.retry.delay || '0s';
50
+ options.connectionRetryCount = options.connectionRetryCount || 1;
51
+ options.connectionRetryDelay = options.connectionRetryDelay || '0s';
53
52
 
54
53
  options.defaultPrimaryKey = options.defaultPrimaryKey || 'id';
55
54
 
@@ -122,14 +121,14 @@ export default class PGed extends EventEmitter {
122
121
 
123
122
  let connectionCount = 0;
124
123
 
125
- while (connectionCount < this._options.connection.retry.count) {
124
+ while (connectionCount < this._options.connectionRetryCount) {
126
125
  try {
127
126
  connectionCount++;
128
127
  this._client = await pool.connect();
129
128
  break;
130
129
  } catch (error) {
131
130
 
132
- if (connectionCount == this._options.connection.retry.count) {
131
+ if (connectionCount == this._options.connectionRetryCount) {
133
132
  throw error;
134
133
  }
135
134
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trenskow/pged",
3
- "version": "5.1.71",
3
+ "version": "5.1.72",
4
4
  "description": "Just a silly little db management and query builder for PostgreSQL.",
5
5
  "main": "index.js",
6
6
  "type": "module",