André Cruz
eb076db5d4
Add configurable query timeout ( #1760 )
...
* Add read_timeout to connection settings
* Fix uncaught error issue
* Fix lint
* Fix "queryCallback is not a function"
* Added test and fixed error returning
* Added query timeout to native client
* Added test for timeout not reached
* Ensure error is the correct one
Correct test name
* Removed dubious check
* Added new test
* Improved test
2018-11-29 09:11:47 -06:00
Mike van Rossum
9bfd4bff40
[test] g/provded/provided
2018-07-17 01:07:00 +08:00
Charmander
0b80abacaf
Specify collation when relied on in tests
...
Fixes #189 .
2017-11-17 14:12:16 -06:00
Brian C
8798e50ad3
Re-enable eslint with standard format ( #1367 )
...
* Work on converting lib to standard
* Finish updating lib
* Finish linting lib
* Format test files
* Add .eslintrc with standard format
* Supply full path to eslint bin
* Move lint command to package.json
* Add eslint as dev dependency
2017-07-15 12:05:58 -05:00
Brian Carlson
27450d07e6
Throw on reconnect attempt
...
Clients are not reusable. This changes the client to raise errors whenever you try to reconnect a client that's already been used. They're cheap to create: just instantiate a new one (or use the pool) 😉 .
Closes #1352
2017-07-15 11:02:09 -05:00
Brian M. Carlson
0f1f8626cf
Add use strict to every file
2017-06-18 16:48:14 -05:00
Brian M. Carlson
313c41a39f
Cleanup
2017-06-18 16:48:14 -05:00
Brian C
812277f99f
Fix native constructor and pool exports ( #1061 )
2016-06-24 00:52:28 -05:00
brianc
9c7a33caca
remove 2 parameter pg.connect function
2013-03-07 15:57:00 -06:00
brianc
8b9e97f5b9
update version of node-pool closes gh #223
...
added integration test to catch any future regressions
2012-12-04 17:53:04 -06:00
Alexander Sulfrian
f698ed4459
use config dict in all test
...
instead of the connection string use the config dict in all tests to
be able to specify things like binary mode
2011-11-22 05:00:54 +01:00
Brian Dunavant
94dc7fd4e8
treat undefined values as NULL. Include test to verify.
2011-10-14 11:31:12 -04:00
brianc
afe4382c63
change assert.length to assert.lengthIs
2011-10-10 19:21:06 -05:00
brianc
45a5142159
remove dead test code
2011-08-29 23:29:08 -05:00
brianc
293eaf8b0f
failing test for inconsistent js/native query api
2011-08-15 20:37:46 -05:00
brianc
4cb97a2b9e
switch to node-pool from custom client pool
2011-08-11 20:59:56 -05:00
Brian Carlson
c98bb21641
failing test for native query with object as first parameter and callback as second parameter
2011-04-20 22:48:40 -05:00
bmc
b76ced7144
begin type coercion for libpq
2011-03-01 21:03:51 +00:00
Brian Carlson
6a2adc1feb
more api compat
2011-02-23 19:40:52 -06:00
Brian Carlson
7d05daaf2c
removed some globals from tests
2011-02-23 19:50:43 -06:00
Brian Carlson
41add49925
failing test for multiple calls of callback when multiple commands are executed
2011-01-18 22:20:23 -06:00
brianc
28bbbf9087
modified connection info for invalid connection test to use localhost
...
in order to avoid long timeouts in dns
2010-12-24 20:01:11 -06:00
Brian Carlson
9281ff9860
failing test for query errors not being trapped in callback
2010-12-16 23:48:58 -06:00
Brian Carlson
b3e56afea2
initial working connection pool implementation & tests
2010-12-13 17:21:40 -06:00
Brian Carlson
ab13d0c1eb
initial crack at connection pooling -- still dirty
2010-12-10 17:32:34 -06:00
Brian Carlson
f0291d30d7
nested query and streamlined api working
2010-12-02 17:47:54 -06:00
Brian Carlson
8d7ff353af
fix to allow executing queries within the callback function of another query.
...
there was a timing issue with emiting the drain event
2010-11-21 23:30:10 -06:00
Brian Carlson
2fd220d8e2
fix to make connection error reporting more robust in test
2010-11-17 13:13:27 -06:00
Brian Carlson
f7d990068f
more integration tests for new api
2010-11-15 01:12:29 -06:00
Brian Carlson
0bde640bab
overloaded "simple" query api to provide callback enabled prepared statement
2010-11-15 00:42:38 -06:00
Brian Carlson
91aac6d350
initial callback api integration underway
2010-11-15 00:10:21 -06:00
Brian Carlson
f8096cbe55
initial work on streamlined client interface
2010-11-14 23:04:41 -06:00