Skip to content

Commit

Permalink
fix jshint errors in lib/native/query.js
Browse files Browse the repository at this point in the history
  • Loading branch information
booo committed Jan 24, 2013
1 parent 3b1a5be commit 0c3e1cb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/native/query.js
Expand Up @@ -20,7 +20,7 @@ var NativeQuery = function(config, values, callback) {
this.text = config.text;
this.values = config.values;
this.callback = config.callback;

this._result = new Result();
//normalize values
if(this.values) {
Expand All @@ -38,8 +38,9 @@ var p = NativeQuery.prototype;
var mapRowData = function(row) {
var result = {};
for(var i = 0, len = row.length; i < len; i++) {
var item = row[i];
result[item.name] = item.value === null ? null : types.getTypeParser(item.type, 'text')(item.value);
var item = row[i];
result[item.name] = item.value === null ? null :
types.getTypeParser(item.type, 'text')(item.value);
}
return result;
};
Expand Down Expand Up @@ -79,14 +80,14 @@ p.handleReadyForQuery = function(meta) {
};
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 = NativeQuery;

0 comments on commit 0c3e1cb

Please sign in to comment.