Skip to content

Commit da1e62e

Browse files
committed
fix jshint errors for lib/query.js
1 parent 616804d commit da1e62e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/query.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var utils = require(__dirname + '/utils');
77

88
var Query = function(config, values, callback) {
99
// use of "new" optional
10-
if (!(this instanceof Query)) return new Query(config, values, callback);
10+
if (!(this instanceof Query)) { return new Query(config, values, callback); }
1111

1212
config = utils.normalizeQueryConfig(config, values, callback);
1313

@@ -19,7 +19,7 @@ var Query = function(config, values, callback) {
1919
this.binary = config.binary;
2020
this.stream = config.stream;
2121
//use unique portal name each time
22-
this.portal = config.portal || ""
22+
this.portal = config.portal || "";
2323
this.callback = config.callback;
2424
this._fieldNames = [];
2525
this._fieldConverters = [];
@@ -34,15 +34,15 @@ var p = Query.prototype;
3434

3535
p.requiresPreparation = function() {
3636
//named queries must always be prepared
37-
if(this.name) return true;
37+
if(this.name) { return true; }
3838
//always prepare if there are max number of rows expected per
3939
//portal execution
40-
if(this.rows) return true;
40+
if(this.rows) { return true; }
4141
//don't prepare empty text queries
42-
if(!this.text) return false;
42+
if(!this.text) { return false; }
4343
//binary should be prepared to specify results should be in binary
4444
//unless there are no parameters
45-
if(this.binary && !this.values) return false;
45+
if(this.binary && !this.values) { return false; }
4646
//prepare if there are values
4747
return (this.values || 0).length > 0;
4848
};
@@ -64,7 +64,7 @@ p.handleRowDescription = function(msg) {
6464
var format = field.format;
6565
this._fieldNames[i] = field.name;
6666
this._fieldConverters[i] = Types.getTypeParser(field.dataTypeID, format);
67-
};
67+
}
6868
};
6969

7070
p.handleDataRow = function(msg) {
@@ -110,7 +110,7 @@ p.handleError = function(err) {
110110
//if callback supplied do not emit error event as uncaught error
111111
//events will bubble up to node process
112112
if(this.callback) {
113-
this.callback(err)
113+
this.callback(err);
114114
} else {
115115
this.emit('error', err);
116116
}
@@ -188,5 +188,5 @@ p.handleCopyFromChunk = function (chunk) {
188188
//if there are no stream (for example when copy to query was sent by
189189
//query method instead of copyTo) error will be handled
190190
//on copyOutResponse event, so silently ignore this error here
191-
}
191+
};
192192
module.exports = Query;

0 commit comments

Comments
 (0)