2464 Commits

Author SHA1 Message Date
Brian M. Carlson
58691218af Bump version v6.2.4 2017-06-09 12:33:55 -05:00
Brian Carlson
76c59a01f2 Emit error when backend unexpectedly disconnects 2017-06-09 12:27:47 -05:00
Sehrope Sarkuni
61921aae1a Add node 8.x to Travis-CI matrix 2017-06-09 09:00:04 -05:00
Sehrope Sarkuni
f69108869e Remove default and normalize Travis-CI matrix
Removes the default node 6 / PG 9.6 combination and adds it to the
Travis-CI matrix of combinations. That way all combinations are
defined in a single place.
2017-06-09 09:00:04 -05:00
Brian C
aeb0c759f5 Remove fallbacks for unsupported Node versions (#1304) (#1313)
* Add client connectionString tests (#1310)

* Remove redundant tests

* Add client connectionString test

Add test to ensure { connectionString } is respected as an argument to the client constructor

* Add test for connection string property

Also fixed some legacy require statements.

* Normalize native error properties

Map native error properties to the same property names we use for errors from the JS driver.

Fixes #972
Fixes #938
2017-06-08 21:53:47 -05:00
Brian M. Carlson
5061068b04 Fix test 2017-06-08 18:18:49 -05:00
Brian C
f2b87e02f1 Add client connectionString tests (#1310)
* Remove redundant tests

* Add client connectionString test

Add test to ensure { connectionString } is respected as an argument to the client constructor

* Add test for connection string property

Also fixed some legacy require statements.
2017-06-07 22:58:03 -05:00
Charmander
934ca3af16 Remove fallbacks for unsupported Node versions (#1304)
* Remove unsupported Node versions 0.10 and 0.12 from CI

* Replace deprecated Buffer constructor with .from/.alloc

* Remove Promise polyfill

* Make use of Object.assign

* Remove checks for versions of Node earlier than 4

* Remove Buffer#indexOf fallback for Node 0.10
2017-06-07 22:45:32 -05:00
brianc
959d89e043 Add test for connectionString property delegation 2017-06-07 22:35:55 -05:00
Brian C
f93385284d Update .travis.yml 2017-06-02 13:00:42 -05:00
Brian C
a51fe56bc1 Update .travis.yml
Drop node@0.10 and node@0.12 from the test matrix.
2017-06-02 09:40:11 -05:00
Amila Welihinda
52c96a4b2e Create LICENSE (#54)
* Create LICENSE

* Update LICENSE
2017-05-29 10:48:58 -05:00
Brian M. Carlson
3757ff7300 Bump version v6.2.3 2017-05-24 09:05:31 -05:00
Raul Ochoa
4cd56cc4f8 Make pool name consistent on missing config params (#1279)
* Going red: using a config object creates two pools when missing some params

It should only create a pool in a consistent way, even if some params
are not provided in the first place.

* Delay the pool name generation to make it consistent between calls

* Don't fallback to empty object as config is already defined
2017-05-24 09:04:50 -05:00
T.J. Schuck
e5f0e5d36a s/2016/2017/ (#1291) 2017-05-17 16:47:07 -05:00
Brian M. Carlson
6e462ffae6 Bump version 2017-05-15 23:16:55 -05:00
Brian C
bbc2b416ed Merge pull request #25 from sberan/cursor-result
Emit Query Events
2017-05-15 23:15:59 -05:00
Brian M. Carlson
c32316df77 Bump version v6.2.2 2017-05-15 12:21:32 -05:00
Sehrope Sarkuni
ee8193673c Libpq connection string escaping (#1285)
* Fix escaping of libpq connection string properties

Fix handlings of libpq connection properties to properly escape single
quotes and backslashes. Previously the values were surrounded in single
quotes which handled whitespace within the property value, but internal
single quotes and backslashes would cause invalid connection strings to
be generated.

* Update expected output in test to be quoted

Update the expect host output in the connection parameter test
to expect it to be surrounded by single quotes.

* Add test for configs with quotes and backslashes
2017-05-15 12:19:13 -05:00
Brian M. Carlson
4659d5d75f Bump version v6.2.1 2017-05-15 09:54:09 -05:00
Brian C
db5f4ae1ab Upgrade packet reader (#1287) 2017-05-15 09:36:18 -05:00
Sam Beran
4427e31661 fix travis build env 2017-05-09 10:13:57 -05:00
Sam Beran
2f480217cb fix: only dispatch error events if we have a listener 2017-05-09 10:13:57 -05: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
Brian Carlson
42af014483 Update travis.yml 2017-05-08 16:49:24 -05:00
Brian Carlson
4bf66e65de Bump version 2017-04-27 14:37:58 -05:00
Brian C
3cad54e061 Merge pull request #23 from sberan/cursor-result
Return result accumulator in callback
2017-04-27 14:37:49 -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
Brian Carlson
a3204168b7 Bump version 2017-04-27 11:42:19 -05:00
Brian C
24d85f5e17 Merge pull request #19 from crisvergara/master
Fix require for webpack compatibility
2017-04-27 11:41:53 -05:00
Attila Olah
54c2044416 feat: add basic typings
To make this app consumable by Typescript apps a typings file must be present.
2017-04-27 12:41:30 +02:00
Brian Carlson
f42924bf05 Bump version v6.2.0 2017-04-24 13:34:03 -05:00
Brian Carlson
80d136a531 Add test & documentation for replicationStart message 2017-04-24 13:33:38 -05:00
Kibae Shin
4f790deb73 Support for logical streaming replication (#1271)
* Support for logical streaming replication

* Wrong compare expr in getLibpqConnectionString

* Simplify codes for replication parameter
2017-04-24 13:24:30 -05:00
Brian C
c9e21f4161 Merge pull request #22 from abenhamdine/master
Add node LTS and current versions to travis matrix
2017-04-24 11:25:08 -05:00
Ary Purnomoz
4505ae98d9 support ssl params for pg-native (#1169)
Make pg-native able to pass sslmode, sslca, sslkey and sslcert params to libpq
2017-04-19 09:55:56 -05:00
Kenneth Schnall
0e2625b74e Add semicolons to Pooling example in README.md (#1266) 2017-04-17 11:43:09 -05:00
brianc
659a448fab Bump version 2017-04-13 10:50:00 -05:00
Russ Tyndall
c89b74bb5d Make a test case and fix for errors drainging the pool (#49)
* this bug leaves the pool empty even if there is work
   to be done, if there are enough consecutive errors to
   empty the pool

re brianc/node-pg-pool#48
2017-04-13 08:26:53 -05:00
Brian M. Carlson
5918a9e105 Bump version 2017-04-01 18:43:04 -05:00
Lewis J Ellis
0b3d68ef31 Bump generic-pool dep to 2.4.3 (#35) 2017-04-01 11:31:33 -05:00
Raul Ochoa
0f323999fc Access Promise through global (#39)
This matches the proposed way in "bring your own promise".
2017-04-01 11:28:27 -05:00
javiertury
71a136488b Improve Readme.md for not so advanced users (#1235)
* Improve Readme.md for not so advanced users

1. Add brief description about the 3 possible ways of executing queries: passing the query to a pool, borrowing a client from a pool or obtaining an exclusive client. Give examples for the 3 of them.

2. Use the examples to teach how to reuse a pool in all of your project. This should be helpful for not so advanced users and prevents mistakes.

3. Open a troubleshooting section.

* Shrink Troubleshooting and Point to Examples

1. Troubleshooting/FAQ section will only contain a reference to the wiki FAQ. I've already moved the content to the wiki.

2. At the end of "Pooling example" point to the wiki example page. Also indicate that there they can find how to use node-postgres with promises and async/await. I've already created that content in the wiki.
2017-03-27 22:21:04 -05:00
Rocky
7504c20745 Fix README.md (#1250) 2017-03-27 22:20:27 -05:00
Brian Carlson
3de22ba991 Bump version v6.1.5 2017-03-20 12:01:56 -05:00
Magnus Hiie
197f86f90d Fix ECONNRESET error emitted after failed connect (#1230)
On Windows, after a connect attempt has failed, an error event with
ECONNRESET is emitted after the real connect error is propagated to the
connect callback, because the connection is not in ending state
(connection._ending) where ECONNRESET is ignored. This change ends the
connection when connect has failed.

This fixes #746.
2017-03-20 12:01:41 -05:00
Ryan Hamilton
549404e21e Update README.md (#1247)
grammar fix
2017-03-20 12:00:57 -05:00
Brian M. Carlson
4fae7a9a7f Bump version v6.1.4 2017-03-09 15:06:29 -06:00
Linus Unnebäck
ce8f215c88 Fix throw in type parsers when in prepared statement (#1242) 2017-03-09 15:05:26 -06:00
Shakeel Mohamed
2aed8bf7b3 Add syntax highlighting to code block in README (#42) 2017-03-06 11:47:30 -06:00