51 Commits

Author SHA1 Message Date
Arnaud Benhamdine
2a46c8a3d4 Add node LTS and current versions to travis matrix 2017-03-01 15:11:40 +01:00
Brian C
802616b028 Update README.md
Remove outdated information about pg.js
2015-11-13 10:53:02 -06:00
Brian C
aa72d9b16a Merge pull request #17 from brianc/more-travis-versions
Add more versions of node to the travis matrix
2015-11-13 10:43:50 -06:00
brianc
df8acf0aaa Bump version 2015-11-13 10:40:12 -06:00
brianc
9aca077f3e Add more versions of node to the travis matrix 2015-11-13 10:39:28 -06:00
Brian C
ca21462f1b Merge pull request #15 from slickmb/bug/close_race
Avoid race when stream closed while fetching
2015-11-13 10:38:18 -06:00
Brian C
edfe1aa9a3 Merge pull request #16 from brianc/conform-to-readable-stream-spec
Conform to readable stream spec
2015-11-13 10:38:09 -06:00
brianc
27bba8de04 Conform to readable stream spec
One of the tests was failing because it was testing that when a stream became readable it never returned a `null` datum on call to `stream.read()`.

In fact, when a readable stream drains it should & does return `null` for calls to `stream.read()` as described [here](https://nodejs.org/api/stream.html#stream_event_readable)

I updated the test to account for this, and they pass now.
2015-11-13 10:33:39 -06:00
matthew.blasius
d1ac31c105 Support a close callback when closing the stream 2015-11-05 16:54:12 -05:00
matthew.blasius
68819dffda Avoid race when stream closed while fetching 2015-11-05 14:09:50 -05:00
Brian M. Carlson
e9d1872c70 Test new travis config 2014-11-03 12:52:04 -05:00
Brian M. Carlson
52f5c709ba Merge branch 'master' of github.com:brianc/node-pg-query-stream 2014-11-03 12:34:24 -05:00
Brian M. Carlson
b38d092fa6 Update travis file 2014-11-03 12:34:16 -05:00
Brian C
aa61055029 Update README.md
Add travis badge
2014-11-03 10:46:25 -05:00
Brian M. Carlson
02ff00a374 Bump version 2014-11-03 10:44:26 -05:00
Brian M. Carlson
1dd2d3a938 Add infrastructure files 2014-11-03 10:44:19 -05:00
Brian C
0b45eda5a3 Merge pull request #7 from brianc/add-close-method
Is it possible to destroy the stream?
2014-11-03 10:42:59 -05:00
Brian M. Carlson
6ab80d3995 Add close method & supporting tests 2014-10-30 18:38:44 -04:00
Brian M. Carlson
df63cbbab7 Bump version 2014-05-22 16:59:23 -04:00
Brian C
7fb1f50023 Merge pull request #5 from calvinmetcalf/fixes
fix tests, clean up a few things
2014-05-22 16:54:14 -04:00
Calvin Metcalf
adf86b89f6 deps 2014-05-22 12:54:14 -04:00
Calvin Metcalf
6763e09cb2 merge it 2014-05-22 12:51:39 -04:00
Brian M. Carlson
99fe666956 Bump version 2014-05-22 11:22:31 -04:00
Brian M. Carlson
e242b94e6c Update version of pg-cursor 2014-05-22 11:20:53 -04:00
Calvin Metcalf
fec090972b clean ups 2014-05-14 10:41:10 -04:00
Calvin Metcalf
41b7d7d4de fix up tests 2014-05-14 09:51:56 -04:00
Brian M. Carlson
7593a44f79 Bump version 2014-04-11 11:01:43 -05:00
Brian C
d82386e1ac Merge pull request #4 from tbuchok/master
maxListeners on timestamp queries
2014-04-11 11:00:30 -05:00
Tom Buchok
cab956ba50 passes stream-tester-timestamp
- moves 'end' event listener to constructor, only listen once
- ensures all existing tests still green
2014-04-09 23:58:18 -04:00
Tom Buchok
87b52f9e51 adds failing test
- appears that timestamp queries emit a lot of `rows` with length == 0
- `self.once('end')` is added each of these times
- assertion on listener count shows that more than 10 listeners are applied
2014-04-09 23:56:21 -04:00
Brian M. Carlson
0f13c8068f Bump version 2014-03-21 11:47:40 -05:00
Brian M. Carlson
1961125476 Update pg-cursor
pg-cursor no longer returns the empty array 'done' signal to the callback
until the cursor recieves a readyForQuery message.  This means pg-query-stream
will not emit 'close' or 'end' events until the server is __truly__ ready for
the next query.  This fixes some race-conditions where some queries
are triggered off of the `end` event of the query-stream

closes #3
2014-03-21 11:47:32 -05:00
Brian M. Carlson
0a7da37ab7 Bump version 2014-02-26 09:38:25 -06:00
Brian M. Carlson
37de9c2ab0 Rebase code on top of pg-cursor 2014-02-26 09:38:16 -06:00
Brian M. Carlson
122bcfb27b Bump version 2014-02-26 07:16:00 -06:00
Brian M. Carlson
b66be5e934 Add test for stream close & satisfy stream contract 2014-02-26 07:15:01 -06:00
Brian M. Carlson
f8f2a92897 Remove Makefile 2014-02-26 07:11:16 -06:00
Brian M. Carlson
290906294d Port tests to use mocha 2014-02-26 07:11:16 -06:00
Brian C
0ed940cbfc Merge pull request #1 from grncdr/patch-1
Emit 'close' events when query completes
2014-02-26 07:11:07 -06:00
Brian C
0df516c549 Add cleanup to the example
closes #2
2014-01-30 23:07:03 -06:00
Stephen Sugden
e1117155ae Emit 'close' events when query completes
Consider a system where one component is scheduling tasks that yield
streams, and passing them to (unknown) clients for consumption.

It would be useful for the scheduler to know that the query
underlying the stream is completed (so it can continue on to it's
next task) without having to wait for the consumer to finish reading
all results.
2013-12-25 13:33:34 -08:00
Brian M. Carlson
0ebd4c3bbb Bump version 2013-10-23 17:11:49 -05:00
Brian M. Carlson
33be525dbb Add ability to configure highWaterMark and batchSize 2013-10-23 17:11:43 -05:00
Brian M. Carlson
278c5ceb87 Update npm test command 2013-10-22 13:20:46 -05:00
Brian M. Carlson
58881357a2 Bump version 2013-10-22 13:19:48 -05:00
Brian M. Carlson
1b249e9ceb Add in proper error handling 2013-10-22 13:19:28 -05:00
Brian M. Carlson
aec85ce0d6 Bump version 2013-10-22 11:36:11 -05:00
Brian M. Carlson
48687fc182 Fix relative load path for pg.js 2013-10-22 11:36:05 -05:00
Brian M. Carlson
cc20d98cb0 Bump version 2013-10-22 11:24:41 -05:00
Brian M. Carlson
5400dfeffd Remove bad code 2013-10-22 11:24:30 -05:00