Commit Graph

222 Commits

Author SHA1 Message Date
Nikhil Benesch
b778f2bdf0 utils-tests: add unit tests for prepareValue 2014-03-30 19:03:24 -04:00
Sandro Santilli
7f4351293c Do not assume PGPORT env variable is unset during testing 2014-03-18 10:06:15 +01: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
Brian M. Carlson
f63476b7b8 Adjust test to ensure DATE data-type is converted to local time 2014-03-14 06:37:00 -05:00
Brian C
ff8fb616f6 Merge pull request #501 from lalitkapoor/GH-452
improve support for int arrays and float arrays
2014-02-26 06:15:35 -06:00
Brian M. Carlson
bf0c4bfaa9 Merge branch 'pull/326'
Conflicts:
	lib/connection-parameters.js
	test/unit/connection-parameters/creation-tests.js
2014-02-26 06:10:15 -06:00
Lalit Kapoor
f1c0abab75 test array/float8 2014-01-08 01:00:03 -06:00
Lalit Kapoor
9bd88f8449 test array/float4 2014-01-08 00:14:42 -06:00
Lalit Kapoor
eee21dd088 test array/int8 2014-01-08 00:13:52 -06:00
Lalit Kapoor
6410a8aca2 test array/int4 2014-01-08 00:13:16 -06:00
Lalit Kapoor
0939490033 test array/int2 2014-01-08 00:12:31 -06:00
Aurélio A. Heckert
c0fd4b1431 Set database on socket string connection
Allows to conect to a specific database trough this ways:
pg.connect('/some/path database', callback);
pg.connect('socket:/some/path?db=database', callback)
pg.connect('socket:/some/path?db=database&encoding=utf8', callback)
2013-12-19 15:37:26 -03:00
Eugene Ware
4662d41972 bind Buffer variables as binary values 2013-09-19 01:50:42 +10:00
Brian Carlson
1674359b57 Respect SSL setting from connection parameters 2013-09-09 11:50:20 -05:00
brianc
bfdea752b2 Respect PGSSLMODE for setting SSL connection 2013-09-05 16:51:16 -05:00
Brian Carlson
4cdd7a116b Compile result parsing for a 60% speed increase
Tested against a 1000 row result set.  Need to test against
smaller result sets & figure out a way to make this backwards compatible if possible
2013-08-07 15:33:57 -05:00
Brian Carlson
fb5520bb8a Remove built-in binary int64 parser 2013-07-30 13:15:31 -05:00
Maciek Sakrejda
816e9b43ea Use the standard postgres:// URL prefix for consistency
Fixes #286.
2013-07-22 10:45:26 -07: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
Brian C
5806afc8a1 Merge pull request #276 from bryanburgers/connection-url-ssl
Add ssl query string to the connection string parser #275
2013-06-29 23:24:02 -07:00
Brian C
42bae0c55e Merge pull request #353 from sevastos/bigint-bulletproofing
Handle bigint as string to prevent precision loss
2013-06-18 19:21:43 -07:00
Dave
f658b31aed Changing to client_encoding, adding test for creating a connection 2013-06-06 12:16:36 -07:00
sevastos
c2a93aafa5 Small improvements in parsers, additions to tests 2013-05-27 10:55:49 +03:00
sevastos
f827f56ed2 BigInt parsing bullet-proofing 2013-05-23 20:10:08 +03:00
bmc
2ef1bbf8de Parse minutes in timezone description
Minutes in timezones are separated with a colon from the hour.

This closes #309
2013-04-22 04:57:46 -05:00
za-creature
264839d3a9 Update creation-tests.js
connection exports 'database' instead of 'path'
2013-04-11 23:10:43 +03:00
za-creature
20a2cbc810 Update creation-tests.js
added unittest for urlencoded components
2013-04-11 22:47:32 +03:00
bmc
766b4286d5 merge branch v1.0 2013-04-04 11:51:55 -05:00
brianc
6e3cc794c3 ignore socket hangup. fixes #314 2013-03-29 09:38:49 -05: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
brianc
cee5f1d8b3 move buffer-writer to external module 2013-03-16 11:51:26 -05:00
Sandro Santilli
f38f9f084d Fix parsing of numeric[], previously returning array of ints
Closes #304, includes testcase
2013-03-14 10:06:46 +01:00
brianc
a5ee365116 remove parseFloat 2013-03-07 16:19:11 -06:00
brianc
e93a4a5d66 remove pauseDrain/resumeDrain 2013-03-07 16:12:09 -06:00
brianc
9c7a33caca remove 2 parameter pg.connect function 2013-03-07 15:57:00 -06:00
swilly
49bff032aa fix tests 2013-03-06 12:00:17 -05:00
Andrew Dunstan
ed015f9b58 Fix Unix domain socket setting.
This code was misconceived in that the host parameter for a Unix
domain socket connection must point to the directory containing
the socket, and not to the socket itself. Libpq will look for
the socket based on the host and port settings. See
<http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS>
2013-02-23 11:11:44 -05:00
Bryan Burgers
79f85a4a9e Add ssl query string to the connection string parser 2013-02-20 18:17:18 -06:00
bmc
cc84799c7a integrate new pool into existing codebase 2013-02-20 16:08:48 -06:00
bmc
bb448fe61a finish out the first rev of the improved pool api 2013-02-19 19:34:28 -06:00
bmc
971eb5d1ef initial work on new pool 2013-02-15 16:13:28 -06:00
Arkady Emelyanov
4c254e8edf force utf-8 encoding on connect 2013-01-29 20:19:38 -06:00
bmc
6f73583112 add another test for weird connection strings 2013-01-29 20:06:50 -06:00
Francois Payette
7d773508fc replace space by %20 in connection string before passing to url.parse 2013-01-24 20:05:55 -05:00
Brian C
beb3e4fcd1 Merge pull request #248 from liamks/master
Added varchar[] and char[] to array parsing.
2013-01-23 20:32:27 -08:00
Liam Kaufman
30fce731ca added unit tests for the three array types 2013-01-23 20:35:20 -05:00
bmc
113b6298e2 use ConnectionParameters with native bindings and remove unused util functions 2013-01-22 23:23:47 -06:00
bmc
1e3107aa55 use ConnectionParameters for js client properties 2013-01-21 16:14:19 -06:00