We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21c31f6 commit de9d5e3Copy full SHA for de9d5e3
lib/query.js
@@ -170,9 +170,11 @@ p.prepare = function(connection) {
170
this.getRows(connection);
171
};
172
p.streamData = function (connection) {
173
- this.stream.startStreamingToConnection(connection);
+ if ( this.stream ) this.stream.startStreamingToConnection(connection);
174
+ else this.handleError(new Error('No destination stream defined'));
175
176
p.handleCopyFromChunk = function (chunk) {
- this.stream.handleChunk(chunk);
177
+ if ( this.stream ) this.stream.handleChunk(chunk);
178
+ else this.handleError(new Error('error', 'No source stream defined'));
179
}
180
module.exports = Query;
0 commit comments