@trenskow/pged 5.0.29 → 5.0.30

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/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -150,10 +150,10 @@ export default class PGed extends EventEmitter {
150
150
  this._transactions.count++;
151
151
  await this._retain();
152
152
  if (this._transactions.count == 1) {
153
+ await this._query('begin;');
153
154
  if (this._transactions.mode !== 'readCommitted') {
154
155
  await this.set.transactionMode[this._transactions.mode]();
155
156
  }
156
- await this._query('begin;');
157
157
  await this.emit('startedTransaction');
158
158
  }
159
159
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trenskow/pged",
3
- "version": "5.0.29",
3
+ "version": "5.0.30",
4
4
  "description": "Just a silly little db management and query builder for PostgreSQL.",
5
5
  "main": "index.js",
6
6
  "type": "module",