Skip to content

Commit 8c48400

Browse files
committed
Fixes duplicated debug lines for postgres (#258)
1 parent 838650b commit 8c48400

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/Drivers/DML/postgres.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var switchableFunctions = {
5050
},
5151
execQuery: function (query, cb) {
5252
if (this.opts.debug) {
53-
require("../../Debug").sql('mysql', query);
53+
require("../../Debug").sql('postgres', query);
5454
}
5555
this.db.connect(this.config, function (err, client, done) {
5656
if (err) return cb(err);
@@ -79,7 +79,7 @@ var switchableFunctions = {
7979
},
8080
execQuery: function (query, cb) {
8181
if (this.opts.debug) {
82-
require("../../Debug").sql('mysql', query);
82+
require("../../Debug").sql('postgres', query);
8383
}
8484
this.db.query(query, function (err, result) {
8585
if (err) {
@@ -157,9 +157,6 @@ Driver.prototype.find = function (fields, table, conditions, opts, cb) {
157157

158158
q = q.build();
159159

160-
if (this.opts.debug) {
161-
require("../../Debug").sql('postgres', q);
162-
}
163160
this.execQuery(q, cb);
164161
};
165162

0 commit comments

Comments
 (0)