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 M. Carlson
f7de9ce820
Non-array query values cause query to end with an error.
...
This is a small change and is _kinda_ backwards compatible since the old behavior was to throw an error, but if someone was relying on anything with `.map` working as values it would break them, so it's in a major semver bump.
2017-07-15 11:19:37 -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
d615ebee17
Start cleaning up tests
2017-06-15 10:32:38 -05:00
Brian M. Carlson
c961c900d6
Almost all tests passing
2017-06-15 10:32:38 -05:00
Brian M. Carlson
bc2f550402
Remove promise-interop from native query
2017-06-15 10:32:38 -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
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
Mayhem
e5d2f96099
Use strictEqual instead
2015-02-22 21:30:22 +01:00
Mayhem
37956e22c5
Fix result.rowCount being a string instead of a number via native bindings.
...
Fixes #708
2015-02-21 17:32:39 +01:00
Brian M. Carlson
c3513a27fa
Make native bindings an optional install
2014-10-18 00:20:18 -04:00
Brian M. Carlson
667c528ea6
Work towards more tests passing
2014-09-14 01:23:02 -04:00
Brian M. Carlson
b325971fdf
Make more tests pass
2014-09-13 22:37:30 -04:00
rpedela
539d3bae54
Move string escaping tests to proper locations.
2013-07-15 09:13:48 -05:00
rpedela
b5e89b2b9a
Add native and JS tests for escapeLiteral and escapeIdentifier.
2013-07-15 09:13:48 -05:00
Andrey Popp
fddf0546d0
test for native to preserve an active domain
2013-05-20 18:30:56 +04:00
brianc
683d636501
better handling of client stream termination
...
1. Pass an error to an active query if the client is ended while a query is in progress.
2. actually emit 'end' event on the client when the stream ends
3. do not emit an error from native bindings if lasterror is null
2013-03-28 13:24:33 -05:00
anton
88d684f925
bugfix. sometimes native copy to loose rows
2013-01-20 19:45:41 -06:00
anton
583d059947
add tests that checks error reporting for incorrect copy to/copy from usage. add tests for fixed bug in native copy from implementation
2013-01-20 19:45:41 -06:00
anton
965b7b4f84
test event exchange between libpq bindings and js while COPY TO/FROM
2013-01-06 12:06:26 -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
brianc
675bb5204c
remove final assert.length
2011-10-10 20:37:08 -05:00
brianc
4cb97a2b9e
switch to node-pool from custom client pool
2011-08-11 20:59:56 -05:00
Brian Carlson
2836c8b64d
native connection failures gracefully emit error from libpq
2011-04-14 22:38:55 -05:00
bmc
47591d677b
callback api working
2011-03-01 19:51:25 +00:00
brianc
ded6c05ed6
callback api failures
2011-02-28 23:09:09 -06:00
brianc
128dbcb84c
failing test for simple query with callback
2011-02-28 22:59:54 -06:00
brianc
3594ab5185
quick support for integer parameters
2011-02-28 22:57:29 -06:00
bmc
8c7083207a
string based parameterized statements working
2011-03-01 01:49:02 +00:00
brianc
ba1c6cf8cf
spacing
2011-02-24 22:09:36 -06:00
brianc
567446e090
error tests
2011-02-24 22:06:19 -06:00
brianc
b7c3db5f32
error test
2011-02-24 21:50:17 -06:00
brianc
f4ca716b93
throw exception when passing non-string to query
2011-02-24 21:44:03 -06:00
brianc
cc2ff042ef
failing test for parameterized queries
2011-02-24 21:33:54 -06:00
brianc
c58037b514
reduce max number of concurrent clients in stress test since it is
...
over the default
2011-02-24 21:19:48 -06:00
Brian Carlson
3233dba5ad
Merge branch 'libpq' of https://github.com/brianc/node-postgres into libpq
2011-02-24 08:05:48 -06:00
Brian Carlson
2a5df5d7c5
added stress tests for native bindings
2011-02-23 23:11:13 -06:00
brianc
ca9b3cb2cd
can pass config object to native query
2011-02-23 22:41:54 -06:00
Brian Carlson
569f760b5e
updated test & makefile to be more in line with other uses
2011-02-23 20:19:27 -06:00
Brian Carlson
cda667df24
tests for PGRES_COMMAND_OKAY and multiple rows
2011-02-23 20:13:22 -06:00
Brian Carlson
c321151325
cleaned up file structure & improved evented query api compat
2011-02-23 20:02:51 -06:00