remove trailing whitespaces in lib/query.js

This commit is contained in:
Philipp Borgers 2013-01-24 01:12:12 +01:00
parent ace259fd0c
commit 051fa5558f

View File

@ -8,9 +8,9 @@ var utils = require(__dirname + '/utils');
var Query = function(config, values, callback) {
// use of "new" optional
if (!(this instanceof Query)) { return new Query(config, values, callback); }
config = utils.normalizeQueryConfig(config, values, callback);
this.text = config.text;
this.values = config.values;
this.rows = config.rows;
@ -36,7 +36,7 @@ p.requiresPreparation = function() {
//named queries must always be prepared
if(this.name) { return true; }
//always prepare if there are max number of rows expected per
//portal execution
//portal execution
if(this.rows) { return true; }
//don't prepare empty text queries
if(!this.text) { return false; }
@ -179,14 +179,14 @@ p.prepare = function(connection) {
};
p.streamData = function (connection) {
if ( this.stream ) this.stream.startStreamingToConnection(connection);
else connection.sendCopyFail('No source stream defined');
else connection.sendCopyFail('No source stream defined');
};
p.handleCopyFromChunk = function (chunk) {
if ( this.stream ) {
this.stream.handleChunk(chunk);
}
}
//if there are no stream (for example when copy to query was sent by
//query method instead of copyTo) error will be handled
//on copyOutResponse event, so silently ignore this error here
//query method instead of copyTo) error will be handled
//on copyOutResponse event, so silently ignore this error here
};
module.exports = Query;