Brian M. Carlson
fbdfc15b89
Bump version
2016-09-13 21:29:56 -05:00
Yanlong Wang
6a7edabc22
When connection fail, emit the error. ( #28 )
...
* When connection fail, emit the error.
If client connect failed, emit the connection error rather than swallowing it.
* Add test for connection error.
2016-09-13 21:26:03 -05:00
Brian M. Carlson
cf28f9357f
Bump version
2016-08-26 09:11:18 -05:00
jphaas
b091cc0d05
Bug fix: Pool.query now calls cb if connect() fails ( #25 )
...
* Pool.query calls cb if connect() fails
Old behavior was that if connect called back with an error, the promise would get rejected but the cb function would never get called.
* Test that Pool.query passes connection errors to callback
* Fixes to standardjs compliance
2016-08-26 09:08:15 -05:00
Brian M. Carlson
f2221a4040
Bump version
2016-08-26 09:07:54 -05:00
Brian M. Carlson
afce7ed6e3
Bump version
2016-08-26 09:05:46 -05:00
brianc
9964208fe8
Bump version
2016-08-05 16:23:05 -05:00
Cody Greene
eca2ea0ede
emit "connect" event only on success and avoid double callback ( #22 )
...
* fail: "connect" event only on success
Double callback invocation will also cause this to fail.
* avoid double callback: _create
If `client.connect` returns an error, then the callback for `Pool#_create` is only invoked once. Also the `connect` event is only emitted on a successful connection, the client is otherwise rather useless.
* legacy compat; don't use Object.assign
* legacy compat; events.EventEmitter
2016-08-05 16:22:50 -05:00
Cody Greene
51fb7db8fa
Support function-like construction (plus test) ( #23 )
...
* Support function-like construction
Remove the necessity of using `new` in front of the `Pool`, i.e. allow it to be used as a regular function. This is following https://github.com/brianc/node-postgres/issues/1077
* add Pool factory test
2016-08-05 16:21:51 -05:00
Risto Novik
1d89029ba7
Added missing new keyword to Heroku example. ( #21 )
2016-07-26 10:18:14 -05:00
Timothy Haley
e2d77719e7
Url parsing example ( #19 )
...
* Added URL parsing example
* Typos and cleanup
* Last typo
2016-07-18 15:54:57 -05:00
brianc
8c42c4172b
Bump version
2016-07-03 16:17:55 -07:00
Brian C
9ab7aff029
Update code to run on >=0.10.0 ( #17 )
...
* Replace const with var
* Update code to run on 0.10.x +
* Lint
2016-07-03 18:17:34 -05:00
Brian C
ef1b15e13a
Update README.md
...
Add note on "bring your own promise"
2016-06-30 15:22:49 -07:00
brianc
22a76ddd1d
Bump version
2016-06-26 22:05:46 -07:00
brianc
d1c70ec9c1
Update documentation
2016-06-26 22:02:49 -07:00
Brian C
d653234a0c
Add acquire event ( #16 )
...
* Add acquire event
Add acquire event which fires every time a client is acquired from the pool.
* Update README.md
2016-06-26 22:00:16 -07:00
Peter W
ce173f8c28
Fix error event doc in README ( #15 )
...
- making error event example code start by acquiring `pool` in
the same way it is done in the example at the top for `create`
2016-06-26 21:39:36 -07:00
Peter W
d316ef5524
Fix example code for connect event ( #14 )
2016-06-25 11:21:40 -07:00
brianc
baa5800a70
Bump version
2016-06-24 09:53:46 -07:00
Brian C
aa1f10b0c0
Add support for pool#query without params ( #12 )
2016-06-24 11:52:32 -05:00
brianc
2d446d4953
Bump version
2016-06-24 11:36:36 -05:00
brianc
f47bc5f23b
Update documentation
2016-06-24 11:35:33 -05:00
Brian C
ce59164ba1
Add callback interface to pool#query ( #11 )
...
* Add callback interface to pool#query
* Fix linting errors
2016-06-24 11:35:16 -05:00
Brian C
8b45ea1e7d
Update README.md
...
Add a section with instructions on where to instantiate your pool
2016-06-24 10:48:23 -05:00
brianc
4758ea660e
Update documentation
2016-06-23 14:34:41 -05:00
Brian C
cc40403de9
Update README.md
2016-06-23 00:22:07 -05:00
brianc
955d6ba797
Bump version
2016-06-23 00:21:16 -05:00
Brian C
c95036c362
Update README.md
...
Add travis badge
2016-06-23 00:21:01 -05:00
Brian C
8c058a300a
Update README.md
2016-06-23 00:09:50 -05:00
Brian C
d2775fc023
Add travis.yml file ( #9 )
...
* Add travis.yml file
* Remove test on pg@9.5 since travis does not support it
2016-06-22 23:55:17 -05:00
Brian C
63caf7cd4c
Add 'connect' event to pool ( #7 )
...
* Have pool emit 'connect' callback with client
* Ensure pool emits client on connect event
2016-06-22 23:29:35 -05:00
Brian C
7ef08fd861
Remove dependency on debug ( #6 )
...
Accept a `log: (message, other...) => { }` parameter as a config option, but by default use a no-op function instead of debug.
2016-06-22 23:29:09 -05:00
brianc
276b50d69f
Bump version
2016-06-22 17:17:11 -05:00
ikokostya
cc20f8b747
Clone options in Pool constructor ( fixes #4 ) ( #5 )
2016-06-22 16:34:17 -05:00
Brian C
d21ed42fc6
Update README.md
2016-06-22 10:03:14 -05:00
Brian C
ef8530aeb7
Update README.md
2016-06-21 22:38:31 -05:00
brianc
d09cf3b9c3
Bump version
2016-06-20 19:57:44 -05:00
Lee Symes
a6f641eb2c
Only release client once on an error. ( #3 )
...
Prevent `generic-pool` error when releasing a client with an error.
Fixes #2
2016-06-20 19:56:12 -05:00
brianc
e38cfe078c
Bump version
2016-06-10 22:52:21 -05:00
brianc
cb21c2a2e7
Better compatibility with pg
2016-06-10 22:52:07 -05:00
Brian C
36d50eceee
Merge pull request #1 from jrf0110/patch-1
...
Demonstrate that pg-pool exports Pool constructor
2016-06-10 21:52:43 -05:00
John Fawcett
d42770ae2c
Demonstrate that pg-pool exports Pool constructor
2016-06-10 21:25:56 -05:00
Brian C
d73538550c
Update README.md
2016-06-10 17:44:48 -05:00
brianc
5c88bd6965
Update readme
2016-06-10 17:40:42 -05:00
Brian C
da6a2b0b0c
Update README.md
2016-06-10 17:17:35 -05:00
Brian C
1decf9693a
Create README.md
2016-06-10 17:16:14 -05:00
brianc
2aa207eea6
Update test semantics
2016-06-10 16:58:23 -05:00
brianc
ad73407aad
Initial commit
2016-06-08 18:40:32 -05:00
brianc
c0d39055f2
Initial commit
2016-06-07 19:16:19 -05:00