@@ -8,9 +8,9 @@ var utils = require(__dirname + '/utils');
8
8
var Query = function ( config , values , callback ) {
9
9
// use of "new" optional
10
10
if ( ! ( this instanceof Query ) ) { return new Query ( config , values , callback ) ; }
11
-
11
+
12
12
config = utils . normalizeQueryConfig ( config , values , callback ) ;
13
-
13
+
14
14
this . text = config . text ;
15
15
this . values = config . values ;
16
16
this . rows = config . rows ;
@@ -36,7 +36,7 @@ p.requiresPreparation = function() {
36
36
//named queries must always be prepared
37
37
if ( this . name ) { return true ; }
38
38
//always prepare if there are max number of rows expected per
39
- //portal execution
39
+ //portal execution
40
40
if ( this . rows ) { return true ; }
41
41
//don't prepare empty text queries
42
42
if ( ! this . text ) { return false ; }
@@ -179,14 +179,14 @@ p.prepare = function(connection) {
179
179
} ;
180
180
p . streamData = function ( connection ) {
181
181
if ( this . stream ) this . stream . startStreamingToConnection ( connection ) ;
182
- else connection . sendCopyFail ( 'No source stream defined' ) ;
182
+ else connection . sendCopyFail ( 'No source stream defined' ) ;
183
183
} ;
184
184
p . handleCopyFromChunk = function ( chunk ) {
185
185
if ( this . stream ) {
186
186
this . stream . handleChunk ( chunk ) ;
187
- }
187
+ }
188
188
//if there are no stream (for example when copy to query was sent by
189
- //query method instead of copyTo) error will be handled
190
- //on copyOutResponse event, so silently ignore this error here
189
+ //query method instead of copyTo) error will be handled
190
+ //on copyOutResponse event, so silently ignore this error here
191
191
} ;
192
192
module . exports = Query ;
0 commit comments