@@ -8,7 +8,9 @@ var Result = require(__dirname + '/../result');
8
8
//event emitter proxy
9
9
var NativeQuery = function ( config , values , callback ) {
10
10
// use of "new" optional
11
- if ( ! ( this instanceof NativeQuery ) ) return new NativeQuery ( config , values , callback ) ;
11
+ if ( ! ( this instanceof NativeQuery ) ) {
12
+ return new NativeQuery ( config , values , callback ) ;
13
+ }
12
14
13
15
EventEmitter . call ( this ) ;
14
16
@@ -37,10 +39,10 @@ var mapRowData = function(row) {
37
39
var result = { } ;
38
40
for ( var i = 0 , len = row . length ; i < len ; i ++ ) {
39
41
var item = row [ i ] ;
40
- result [ item . name ] = item . value == null ? null : types . getTypeParser ( item . type , 'text' ) ( item . value ) ;
42
+ result [ item . name ] = item . value === null ? null : types . getTypeParser ( item . type , 'text' ) ( item . value ) ;
41
43
}
42
44
return result ;
43
- }
45
+ } ;
44
46
45
47
p . handleRow = function ( rowData ) {
46
48
var row = mapRowData ( rowData ) ;
@@ -61,7 +63,7 @@ p.handleError = function(error) {
61
63
} else {
62
64
this . emit ( 'error' , error ) ;
63
65
}
64
- }
66
+ } ;
65
67
66
68
p . handleReadyForQuery = function ( meta ) {
67
69
if ( this . _canceledDueToError ) {
@@ -86,5 +88,5 @@ p.handleCopyFromChunk = function (chunk) {
86
88
//if there are no stream (for example when copy to query was sent by
87
89
//query method instead of copyTo) error will be handled
88
90
//on copyOutResponse event, so silently ignore this error here
89
- }
91
+ } ;
90
92
module . exports = NativeQuery ;
0 commit comments