Skip to content

Commit

Permalink
Removes duplicated postgres debug calls (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
dresende committed Aug 2, 2013
1 parent 8c48400 commit 272850a
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/Drivers/DML/postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ Driver.prototype.count = function (table, conditions, opts, cb) {

q = q.build();

if (this.opts.debug) {
require("../../Debug").sql('postgres', q);
}
this.execQuery(q, cb);
};

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

if (this.opts.debug) {
require("../../Debug").sql('postgres', q);
}
this.execQuery(q + " RETURNING *", function (err, results) {
if (err) {
return cb(err);
Expand All @@ -223,9 +217,6 @@ Driver.prototype.update = function (table, changes, conditions, cb) {
.where(conditions)
.build();

if (this.opts.debug) {
require("../../Debug").sql('postgres', q);
}
this.execQuery(q, cb);
};

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

if (this.opts.debug) {
require("../../Debug").sql('postgres', q);
}
this.execQuery(q, cb);
};

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

if (this.opts.debug) {
require("../../Debug").sql('postgres', q);
}
this.execQuery(q, cb);
};

Expand Down

0 comments on commit 272850a

Please sign in to comment.