Commit Graph

74 Commits

Author SHA1 Message Date
Brian M. Carlson
79f03948dd Use packet reader 2014-03-14 06:59:19 -05:00
Hannes Hörl
7fd79a41c3 Add support for (fallback_)application_name 2014-01-05 18:08:58 +01:00
Eugene Ware
4662d41972 bind Buffer variables as binary values 2013-09-19 01:50:42 +10:00
Rob Raux
bf419d2659 fix global variable leaks 2013-09-11 14:36:29 +00:00
Brian Carlson
beeae35291 Fix js-hint error 2013-08-17 17:33:27 -05:00
Brian Carlson
c98125b065 Use on('data') for v0.8.x 2013-08-17 17:25:24 -05:00
Brian Carlson
5108161a47 Cleanup & tweak perf a bit 2013-08-17 14:21:19 -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
b6bca99489 Minor speed improvements 2013-08-07 12:41:38 -05:00
Brian Carlson
56b7c4168d Create message in each parsing function 2013-08-07 12:20:51 -05:00
Brian Carlson
31318c02a2 Speed up JavaScript parser slightly 2013-08-07 11:57:43 -05:00
bmc
44784fa2f3 Fix JavaScript SSL upgrade logic
I had accepted the pull request way back without proper test coverage.
I've added test coverage & fixed this long-standing bug.
2013-06-29 23:20:48 -07:00
bmc
b33c266734 increase speed of javascript parser ~5% 2013-04-08 19:04:17 -05:00
bmc
ca5c10a02f clean up connection slightly & add initial bench 2013-04-08 16:44:41 -05: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
Brian C
ed75b2f453 Merge pull request #291 from wgraeber/master
Potential fix for client_encoding error
2013-03-07 05:32:15 -08:00
brianc
c57eee8661 normalize whitespace, add comments, and do a little house cleaning 2013-03-06 10:26:40 -06:00
brianc
b58ae9e7f7 clean up prototype shorthand
For some reason a few years ago I thought it would be neat to use a shorthand version of prototype to save myself some keystrokes.  That was a cosmetic mistake.  It also breaks ctags.

Also, normalized some whitespace.
2013-03-06 08:48:52 -06:00
swilly
d4dc76077b possible fix for: error: unrecognized configuration parameter 'lient_encoding' 2013-03-05 15:44:20 -05:00
Arkady Emelyanov
4c254e8edf force utf-8 encoding on connect 2013-01-29 20:19:38 -06:00
Philipp Borgers
d8255c6f85 fix jshint errors in lib/connection.js 2013-01-24 22:05:34 +01:00
Philipp Borgers
cedcf0ca35 fix jshint errors for lib/connection.js 2013-01-24 21:59:28 +01:00
Sandro Santilli
2fc22de21a Send backend a CopyFail when no stream is defined to copy from 2013-01-16 12:41:14 +01:00
anton
c014096e0e COPY TO/FROM native/libpq done. Looks like it works, but need to test 2013-01-06 12:06:26 -06:00
brianc
c5b804f5c4 fix reference to ssl parameters 2012-12-04 14:18:19 -06:00
bmc
9341efe669 allow options to pass to js ssl connection bindings 2012-09-10 21:40:41 -05:00
Bruno Harbulot
158562f3d1 Initial support for SSL/TLS connections. 2012-08-20 21:41:56 -05:00
brianc
fa80b4e3fa make data conversion the same between native & javascript 2012-07-11 22:47:02 -05:00
brianc
7a2c428973 ignore writes to unwritable sockets - closes #130 2012-05-30 22:41:51 -05:00
Alexander Sulfrian
8730a31444 Merge remote branch 'upstream/master' 2011-11-19 00:35:21 +01:00
Alexander Sulfrian
916895639b Merge remote branch 'upstream/master'
Conflicts:
	lib/query.js
	lib/types.js
	test/unit/client/query-tests.js
	test/unit/client/typed-query-results-tests.js
2011-11-18 21:12:28 +01:00
Christophe Macabiau
f3c8b972fe query cancellation 2011-11-02 16:07:14 +01:00
Brian Dunavant
94dc7fd4e8 treat undefined values as NULL. Include test to verify. 2011-10-14 11:31:12 -04:00
brianc
06585d6e2c require 'util' instead of 'sys' 2011-10-10 19:40:52 -05:00
brianc
b728186a7d Merge branch 'master' of https://github.com/brianc/node-postgres 2011-10-03 23:14:09 -05:00
Homme Zwaagstra
21b597ef17 All errors are now instances of the built in Error class
This is a fix for issue #50. It alters both the native binding and the
javascript binding to ensure that any errors returned by Postgresql
are returned to the client code as instances of the built in Error
class.

The test code has been updated to assert that this is the case. Rather
than run some individual tests the updated test code ensures this is
the case for *all* errors encountered during a test run.
2011-09-22 12:36:12 +01:00
brianc
cd4e95d88c remove unused code 2011-09-16 00:13:22 -05:00
Alexander Sulfrian
207b7dbb2b Merge remote branch 'upstream/master'
Conflicts:
	lib/query.js
	test/unit/client/typed-query-results-tests.js
2011-06-21 21:42:43 +02:00
brianc
526a6284f9 50x performance increase on javascript client prepared statement execution on linux! 2011-04-16 11:42:23 -05:00
Alexander Sulfrian
796b8dfadc added option for using the binary format 2011-02-14 16:42:04 +01:00
Alexander Sulfrian
fa35c13658 Merge remote branch 'upstream/master'
Conflicts:
	lib/query.js
2011-01-29 01:19:33 +01:00
Brian Carlson
ab76f648b8 removed last Buffer.copy from outgoing packet construction 2011-01-27 09:40:07 -06:00
Alexander Sulfrian
1e6124746c conversion pg text to binary protocol started 2011-01-27 15:10:45 +01:00
brianc
f13b0ba35c using same writer reference to improve performance 2011-01-01 12:40:45 -06:00
Brian Carlson
e61ec5dfed unit test for portal suspended 2010-11-14 17:44:36 -06:00
brianc
0c777fafec fix for strang \0 buffer encoding issue in node v0.3.0 2010-11-01 22:11:40 -04:00
brianc
0f926ca62e refactored to increase performance 2010-10-31 18:36:35 -05:00