Brian C
b1b2801c71
Add onFailure to query#then ( #1082 )
...
The promise adapter I had implemented wasn't spec compliant: it didn't accept both `onSuccess` and `onFailure` in the call to `query#then`. This subtly broke yield & async/await because they both rely on `onError` being passed into `Promise#then`. The pool was also not returning the promise after a client was acquired, which broke awaiting on `pool.connect` - this is also fixed now.
2016-07-19 10:16:48 -05:00
Illirik Smirnov
522d62229b
Resolve merge conflict in PR #1041 ( #1065 )
...
* Add license comment
* Delete pool.js
2016-06-24 10:56:43 -05:00
Brian C
812277f99f
Fix native constructor and pool exports ( #1061 )
2016-06-24 00:52:28 -05:00
brianc
406357b9c6
Better indication that pg.pools is a private api
2016-06-21 22:03:25 -05:00
Brian C
796a44f54f
Remove internal pool ( #1049 )
...
* Initial work on removing internal pool
* Port backwards-compabible properties
* Cleanup test execution & makefile cruft
* Attempt to fix flakey error test
2016-06-21 09:53:09 -05:00
Pavel Lang
ad2ffce986
pg.native returns null if pg-native is missing ( #950 )
...
`require('pg').native` will be `null` and report error once to `stdout` when `pg-native` is missing.
2016-06-07 16:02:07 -05:00
Brian C
a8bd44a6ec
Requiring native bindings polutes 'global' ( #984 )
...
There was some nasty global-ish variable reference updating happening when the native module 'initializes' after its require with `require('pg').native`
This fixes the issue by making sure both `require('pg')` and `require('pg').native` each initialize their own context in isolation and no weird global-ish references are used & subsequently stomped on.
2016-04-08 18:46:10 -05:00
Joost Farla
f50f5ce7e8
Require statements break Browserify compatibility
2015-10-10 11:10:51 +02:00
Brian M. Carlson
c3513a27fa
Make native bindings an optional install
2014-10-18 00:20:18 -04:00
Brian M. Carlson
3867851341
Make cancel query tests pass
2014-10-09 21:12:17 -04:00
Marek
47b0aafa6d
Make sure 'end' is emitted even if no connection has ever happened
2014-05-13 12:57:01 +01:00
Ricky Ng-Adam
0882c8da02
from ended to end
2014-04-18 23:30:45 +08:00
Ricky Ng-Adam
9ab6ed76d1
remove extra whitespace
2014-04-17 17:04:46 +08:00
Ricky Ng-Adam
85c28e9088
destroyAllNow also has a callback
2014-04-17 16:25:59 +08:00
Ricky Ng-Adam
382d6d66f9
emit event when all pool are actually destroyed
2014-04-17 16:18:49 +08:00
Brian M. Carlson
0254fa565f
Add test for pg.types interface
2014-03-15 15:41:36 -05:00
Brian M. Carlson
876abe8730
Break type parsing into separate module
2014-03-15 15:36:27 -05:00
Aaron Boyd
0632c4eaf4
remove reference to pool when destroying
...
Leaving a reference to the pool means the
destroyed pool will get returned if you
later try to reconnect with the same
connection string.
2013-07-09 18:22:09 -07:00
Hannes Hörl
e9cb2965e9
Bugfix: safe call of .hasOwnProperty(...)
2013-06-26 23:46:15 +02:00
Hannes Hörl
c126ba1c7c
Added NODE_PG_FORCE_NATIVE to force usage of libpg bindings (native client)
2013-06-26 22:32:07 +02:00
brianc
37bb13fc0c
move type conversion related code under sub-folder
2013-03-06 08:57:38 -06:00
bmc
cc84799c7a
integrate new pool into existing codebase
2013-02-20 16:08:48 -06:00
Philipp Borgers
6bc512a71f
fix jshint error in lib/index.js
2013-01-24 22:05:35 +01:00
Philipp Borgers
3b1a5beba8
remove trailing whitespaces in lib/index.js
2013-01-24 22:03:02 +01:00
Philipp Borgers
ffe2c15a65
fix jshint errors for lib/index.js
2013-01-24 22:03:02 +01:00
Stephen Sugden
903e9b25ea
Attach Query constructors to Client constructors
2012-12-16 00:58:30 -06:00
Troy Kruthoff
e62eb9339b
make Query a public api
2012-12-10 21:32:20 -06:00
Michael Jackson
ffe4cdcf27
Export types module
2012-10-15 17:45:06 -05:00
Thomas Dimson
ae88278845
Add pass-through of log function to generic-pool. Bump generic-pool version.
2012-07-15 20:08:26 -07:00
brianc
4d482e451b
use client#connect callback in pg.connect connection error handling
2012-07-05 22:38:07 -05:00
booo
89e1c6633a
fix issue #89
2012-02-02 23:14:34 -06:00
Christophe Macabiau
f3c8b972fe
query cancellation
2011-11-02 16:07:14 +01:00
brianc
06585d6e2c
require 'util' instead of 'sys'
2011-10-10 19:40:52 -05:00
brianc
f888f3b947
cleanup code
2011-08-29 22:48:17 -05:00
brianc
2ddc553ee4
pg object emit error event on idle pooled client errors
2011-08-29 02:35:46 -05:00
brianc
e6fe115962
use native in native pg.connect
2011-08-15 20:15:43 -05:00
brianc
c16c7f619d
configurable idle timeout on pooled clients
2011-08-11 21:52:29 -05:00
brianc
4cb97a2b9e
switch to node-pool from custom client pool
2011-08-11 20:59:56 -05:00
brianc
a580c8ab8d
code cleanup
2011-05-02 00:32:30 -05:00
brianc
0d19522339
code cleanup
2011-05-01 21:35:00 -05:00
brianc
e98ef9a011
fix require to be path friendly
2011-03-15 23:08:37 -05:00
brian
c72dea82d9
no longer explode if native module didn't build correctly
2011-03-15 23:00:58 -05:00
brianc
f815c990c3
updated readme & package for new version
2011-03-11 12:29:27 -06:00
brianc
0b97f699c5
merge master into topic
2011-03-03 18:31:20 +00:00
brianc
7e2f713af3
running all client integration tests against native client - many failures
2011-03-03 18:21:43 +00:00
brianc
b6c3f7d478
remove unused 'net' reference
2011-03-03 18:10:17 +00:00
brianc
bfaefce930
remove unused 'sys' reference
2011-03-03 18:09:47 +00:00
brianc
7f5f554503
js client emits 'connect' event
2011-03-03 18:07:22 +00:00
bmc
c0ef5296c6
support for connecting via domain socket
2011-03-01 20:35:14 +00:00
Brian Carlson
e6e643ac6d
commented out logging statements
2010-12-14 21:21:28 -06:00