Brian C
e34c6021ef
Merge pull request #32 from hetul/fix-closing-finished-connections
...
Fix closing a finished cursor without supplying a callback
2019-12-18 12:38:30 -06:00
Hetul Patel
124c89b173
fix lint issues
2019-12-13 15:30:40 -08:00
Brian M. Carlson
cedce4bded
Fix lint & enable all tests
2019-10-30 12:52:06 -05:00
Brian M. Carlson
507c7eaca4
Merge branch 'master' into bmc/add-test-and-deprecate-method
2019-10-30 12:47:14 -05:00
Brian M. Carlson
bd86514c72
Add another test
2019-10-30 11:43:17 -05:00
Brian M. Carlson
389d5d8c14
Fix named portal being left open
...
When code was added to use a random named portal instead of the empty portal to support redshift we didn't update the close messages approprately. This could result in postgres keeping locks on tables for modification if streaming and table modification was both done within a transaction. This update fixes the issue by always issuing a close command on the named portal when query is finished.
fixes #56
2019-10-30 11:33:52 -05:00
Brian M. Carlson
d3aee3dfc8
Add additional pool test & deprecate .end
...
There are no tests covering cursor.end(). It's also a weird method to have on the cursor as it terminates the connection to postgres internally. I don't recall why I added this method in the first place but its not correct to close a connection to postgres by calling .end on a cursor...seems like a pretty big footgun. If you have a pooled client and you call `cursor.end` it'll close the client internally and likely confuse the pool. Plus it's just weird to be able to close a connection by calling .end on a query or cursor. So...I'm deprecating that method.
2019-10-28 11:45:20 -05:00
Brian C
ff09b3f21d
Merge branch 'master' into fix-closing-finished-connections
2019-10-25 18:19:19 -05:00
Brian M. Carlson
be0321299b
Update lint, fix for pg@7.x
2019-10-25 18:11:53 -05:00
Brian M. Carlson
4164686c4b
meh
2019-10-25 18:03:07 -05:00
Brian M. Carlson
414fac6a05
Apply prettier to code, change lint rules
2019-10-25 12:14:27 -05:00
jakob
2398e992a8
return rowCount on insert
2018-01-01 18:43:18 +00:00
Hetul Patel
24e485e81e
Fix closing a finished cursor without supplying a callback
2017-10-03 18:13:40 -07:00
Brian M. Carlson
e0b2e41e57
Fix lint
2017-08-05 18:25:09 -05:00
Brian M. Carlson
4ff97f54bf
Add support for rowMode & custom types
2017-08-05 18:22:54 -05:00
Brian M. Carlson
bbefeb8670
Remove unused file
2017-08-05 17:25:13 -05:00
Brian M. Carlson
2ced8f1f2b
Integrate eslint
2017-08-05 17:24:49 -05:00
Brian M. Carlson
3675d2b041
Fix to support node@4 LTS
2017-08-05 17:17:24 -05:00
Brian Carlson
a720dc774b
Some cleanup
2017-08-05 16:59:20 -05:00
Rick Bergfalk
6072bcea8e
Merge remote-tracking branch 'brianc/master'
2017-08-04 16:58:34 -04:00
Rick Bergfalk
9c7d2c853e
Test cursor with pg-pool
2017-08-04 16:58:32 -04:00
Sam Beran
acae15de53
Emit Query Events
...
This change adds events to the `Cursor` object
as per the [Query API](https://github.com/brianc/node-postgres/wiki/Query ).
2017-05-09 10:13:57 -05:00
Sam Beran
557e5f879d
Return result accumulator in callback
...
fixes issue: https://github.com/brianc/node-pg-cursor/issues/22
2017-04-27 14:26:11 -05:00
Rick Bergfalk
74b6891b20
handle empty query
2016-06-28 16:47:50 -05:00
Brian M. Carlson
19a2d26fc1
Add client#close
...
Closes #6
2014-09-24 23:42:51 -04:00
Stephen Sugden
9cc3e527da
add failing test for noData queries
2014-05-21 22:42:35 +02:00
Brian M. Carlson
f1dbe7884c
Normalize parameter values
2014-02-26 09:30:00 -06:00
Brian M. Carlson
9af987fa63
Pass all tests
2013-11-20 22:30:52 -06:00
Brian M. Carlson
31b2b1da6f
All tests passing in isolation
...
Still have weird race conditions & shutdown/error/resume conditions to tackle
2013-11-11 23:20:04 -06:00
Brian M. Carlson
2e33d4acc0
Add default mocha options
2013-11-08 17:08:55 -06:00
Brian M. Carlson
9e2f622403
Port tests to use mocha
2013-11-08 17:07:54 -06:00
Brian Carlson
31fd30d329
Fix test
2013-10-07 11:54:58 -05:00
Brian Carlson
fc875b0c1d
Rename method
2013-10-07 11:54:23 -05:00
Brian Carlson
5d27cf24e2
Initial commit
2013-10-07 11:52:36 -05:00