node-pg-query-stream
node-pg-query-stream copied to clipboard
TypeError: self.activeQuery.handleEmptyQuery is not a function
It appears that QueryStream cannot handle queries that only return a few rows (less than 100). Here is the full stack trace:
TypeError: self.activeQuery.handleEmptyQuery is not a function
at Connection.<anonymous> (/Users/user/github/proj/server/app/node_modules/pg/lib/client.js:227:22)
at emitOne (events.js:116:13)
at Connection.emit (events.js:211:7)
at Socket.<anonymous> (/Users/user/github/proj/server/app/node_modules/pg/lib/connection.js:118:12)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:594:20)
I have queries that I want to always be streaming, but sometimes the submitted parameters limit the result set to only a few records
Ok, turns out that was not the problem. There were some query calls where the parameters were wrong, and the query really was empty. Still, QueryStream should implement the handleEmptyQuery right?