Skip to content

Commit 272850a

Browse files
committed
Removes duplicated postgres debug calls (#258)
1 parent 8c48400 commit 272850a

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

lib/Drivers/DML/postgres.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@ Driver.prototype.count = function (table, conditions, opts, cb) {
184184

185185
q = q.build();
186186

187-
if (this.opts.debug) {
188-
require("../../Debug").sql('postgres', q);
189-
}
190187
this.execQuery(q, cb);
191188
};
192189

@@ -196,9 +193,6 @@ Driver.prototype.insert = function (table, data, id_prop, cb) {
196193
.set(data)
197194
.build();
198195

199-
if (this.opts.debug) {
200-
require("../../Debug").sql('postgres', q);
201-
}
202196
this.execQuery(q + " RETURNING *", function (err, results) {
203197
if (err) {
204198
return cb(err);
@@ -223,9 +217,6 @@ Driver.prototype.update = function (table, changes, conditions, cb) {
223217
.where(conditions)
224218
.build();
225219

226-
if (this.opts.debug) {
227-
require("../../Debug").sql('postgres', q);
228-
}
229220
this.execQuery(q, cb);
230221
};
231222

@@ -235,18 +226,12 @@ Driver.prototype.remove = function (table, conditions, cb) {
235226
.where(conditions)
236227
.build();
237228

238-
if (this.opts.debug) {
239-
require("../../Debug").sql('postgres', q);
240-
}
241229
this.execQuery(q, cb);
242230
};
243231

244232
Driver.prototype.clear = function (table, cb) {
245233
var q = "TRUNCATE TABLE " + this.query.escapeId(table);
246234

247-
if (this.opts.debug) {
248-
require("../../Debug").sql('postgres', q);
249-
}
250235
this.execQuery(q, cb);
251236
};
252237

0 commit comments

Comments
 (0)