不要怂,就是干,撸起袖子干!

Commit 1221dacb by Sascha Depold

use query.sql more consequently

1 parent 78c745a4
Showing with 3 additions and 5 deletions
......@@ -15,16 +15,14 @@ Query.prototype.run = function(query) {
port: this.config.port,
database: this.config.database
})
// Save the query text for testing and debugging.
this.sql = query
if(this.options.logging)
console.log('Executing: ' + query)
console.log('Executing: ' + this.sql)
client.connect()
client.query(query, function(err, results, fields) {
err ? self.onFailure(err) : self.onSuccess(query, results, fields)
client.query(this.sql, function(err, results, fields) {
err ? self.onFailure(err) : self.onSuccess(self.sql, results, fields)
})
client.on('error', function(err) { self.onFailure(err) })
client.end()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!