mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
fix jshint errors in lib/native/query.js
This commit is contained in:
parent
3b1a5beba8
commit
0c3e1cba83
@ -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) {
|
||||
@ -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;
|
||||
};
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user