We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4764e9a commit 4e54d26Copy full SHA for 4e54d26
lib/transaction.js
@@ -19,7 +19,14 @@ function mixinTransaction(PostgreSQL) {
19
* @param isolationLevel
20
* @param cb
21
*/
22
- PostgreSQL.prototype.beginTransaction = function(isolationLevel, cb) {
+ PostgreSQL.prototype.beginTransaction = function(isolationLevel, options, cb) {
23
+
24
+ if ((!cb) && typeof options === 'function') {
25
+ cb = options;
26
+ options = {};
27
+ }
28
+ options = options || {};
29
30
const connector = this;
31
debug('Begin a transaction with isolation level: %s', isolationLevel);
32
this.pg.connect(function(err, connection, done) {
0 commit comments