Commit Graph

154 Commits

Author SHA1 Message Date
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
Philipp Borgers
a7e9072ab8 fix jshint errors in lib/client.js 2013-01-24 22:05:35 +01:00
Philipp Borgers
4e5e75dbee fix jshint errors for lib/client.js 2013-01-24 22:01:52 +01:00
bmc
1e3107aa55 use ConnectionParameters for js client properties 2013-01-21 16:14:19 -06:00
anton
8ea2f259ed bugfix: correctly create new connection for canceling copy to query 2013-01-20 19:45:41 -06:00
anton
c5c31143c1 1. behave correctly if copy to/from is send to db by query method (report error in standart way); 2. bugfix and code review in native copy to implementation 2013-01-20 19:45:40 -06: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
Stephen Sugden
903e9b25ea Attach Query constructors to Client constructors 2012-12-16 00:58:30 -06:00
brianc
1c43930ba1 cleanup & fix failing tests to allow for green merge of pull #228 2012-12-10 22:44:58 -06:00
Troy Kruthoff
e62eb9339b make Query a public api 2012-12-10 21:32:20 -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
Brian Bickerton
fc3b34d42f Use 'self.activeQuery' insead of 'this.activeQuery' in the readyForQueue event listener. 2012-05-08 10:07:43 -04:00
Kenny Meyer
a25ef7cae4 Fix indentation 2012-03-22 17:32:56 -03:00
Alexander Sulfrian
f8962fd036 connection can be binary by default
if connection is created with config.binary = true, all queries get
executed with binary result unless explicit disabled with binary = false
2011-11-22 04:53:38 +01:00
Alexander Sulfrian
5d8c8bbcdc fix recognition of query format for empty queries in dictionary format
queries like {text: ""} did not get recognized correctly before and
get converted to {text: {text: ""}}
2011-11-22 04:53:38 +01: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
booo
5f7e85162a lib/client: added optional callback function to client.prototype.connect(); issue #52 2011-10-03 03:26:49 -05:00
brianc
ec1c70c4b5 ability to pause/resume drain event for long-running async transactions 2011-08-29 23:43:36 -05:00
brianc
cc77a67745 remove double init of variable 2011-06-02 07:24:42 -05:00
brianc
c1b5fe2ab0 native 'notify' and 'notification' events 2011-03-04 20:04:59 +00:00
brianc
bbe704b8db merged master 2011-03-04 19:32:54 +00:00
brianc
1cd1721f7f integration notification tests 2011-03-04 19:30:19 +00:00
brianc
749531f597 notification message 2011-03-03 23:20:47 -06:00
brianc
13a5803aac Merge branch 'master' into libpq 2011-03-03 22:45:00 -06:00
brianc
ec158770f5 client emits notify message from connection 2011-03-03 22:44:31 -06:00
brianc
5459773b90 properly emit notice messages on client 2011-03-03 23:30:17 +00:00
brianc
0b97f699c5 merge master into topic 2011-03-03 18:31:20 +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
brianc
039c394cb1 make pulseQueryQueue explicitly private 2011-02-04 20:07:59 -06:00
brianc
4724444e3d move parseConnectionString utility function into utils 2011-02-04 20:06:52 -06:00
brianc
5496f3199e remove net.Stream references from client 2011-02-04 20:05:02 -06:00
brianc
0732ee215f readability refactoring 2011-02-04 20:03:41 -06:00
brianc
84e452e221 style cleanup 2011-02-04 19:45:30 -06:00
brianc
a5fce8eb7b query events for prepared statements are handled by client 2011-02-04 19:30:30 -06:00
brianc
99093b34c8 query events handled by client in simple query scenario 2011-02-04 19:15:57 -06:00
brianc
daa370a610 move some query listener delegation to client 2011-02-04 19:03:23 -06:00
brianc
cb647935bb slight readability refactor 2011-02-04 18:51:23 -06:00
brianc
51d922f3e1 a connection string without all settings no longer causes client
constructor to throw error
2010-12-28 10:44:33 -06:00
Brian Carlson
5a87972983 remove active query reference when client drains 2010-12-10 16:56:10 -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
9c33571853 removed some unused variables in client 2010-11-20 14:23:48 -06:00
Brian Carlson
de5438e6f5 started working on specifying defaults 2010-11-20 14:09:18 -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
6585f85d03 query object now emits query related errors, client object no longer
emits query related errors
2010-11-14 16:50:38 -06:00
brianc
d77fd0ee65 ability to init connection with url instead of config object 2010-11-10 21:45:39 -06:00
brianc
d2e3dfb647 split query out from client file and did minor refactorings 2010-11-03 00:27:11 -05:00
brianc
7ce1ddeab5 small refactorings 2010-11-02 23:46:13 -05:00
brianc
1b9ccf97e9 reduced number of flush messages during prepared statement, 2x performance 2010-11-02 03:29:11 -05:00
brianc
381598d3c0 date type coercion works in both directions 2010-11-02 00:50:42 -05:00
brianc
2c362250b3 use regex for date part parse 2010-11-02 00:46:29 -05:00
brianc
6841178ca2 modified tests to correctly check for adjusted utc values 2010-11-02 00:23:39 -05:00
brianc
07010389ff basic (ugly) date type coercion tests 2010-11-01 00:27:06 -05:00
brianc
074779b5ff initial work on dates 2010-11-01 00:27:05 -05:00
brianc
0d2d6b5107 Moved buffer list to test directory and replaced w/ slightly cleaner
"writer" for use in the library code.  BufferList was always supposed
to be a test helper and the api is trash
2010-10-31 18:21:37 -05:00
brianc
405fbbec12 nulls supported in all currently supported type coercions 2010-10-30 21:10:26 -05:00
bmc
577f48f824 added 'drain' event to client which fires after all pending queries
are done
2010-10-29 20:48:31 -04:00
brianc
da8026df9d prepared statements moved forward a good deal 2010-10-28 19:09:40 -05:00
brianc
104727fd87 simple prepared statements working! 2010-10-28 00:50:45 -05:00
brianc
adc8bfa7bf start chopping up client to support prepared statements 2010-10-27 16:58:58 -05:00
brianc
f04ad8e64c boolean coercion 2010-10-27 00:31:34 -05:00
brianc
86d5296fb0 parsing floats 2010-10-27 00:15:58 -05:00
brianc
368724d4f4 integer datatype coercion in result set 2010-10-26 23:57:36 -05:00
brianc
b5d02a995a basic test for client error handling 2010-10-26 08:51:12 -05:00
brianc
c3f69a8be7 add end to client 2010-10-25 17:24:17 -05:00
brianc
80ee829ba0 testing out the query interface 2010-10-24 23:32:18 -05:00
brianc
59aed65b78 tests for simple query queue scenarios 2010-10-24 22:52:12 -05:00
brianc
d927e7e3f5 changed Connection#startupMessage to Connection#startup 2010-10-24 21:28:10 -05:00
brianc
e89aa9c84c changed Connection#passwordMessage to Connection#password 2010-10-24 21:26:18 -05:00
brianc
3edb02aa67 big refactor, all tests passing 2010-10-23 20:26:24 -05:00
brianc
89ca74c6d1 removed connection methods from client 2010-10-23 19:30:15 -05:00
brianc
ed909cbc66 connection now handles ending 2010-10-23 19:28:57 -05:00
brianc
9749ec4fdc md5 password authentication using connect 2010-10-23 19:21:01 -05:00
brianc
3662e6f4af clear password using connection 2010-10-23 19:02:13 -05:00
brianc
057df36e2a simple bound queries 2010-10-23 16:21:11 -05:00
brianc
5650b02993 initial work on binding 2010-10-23 15:07:26 -05:00
brianc
95ec1b403c parsing of prepared queries with no parameters 2010-10-23 14:50:28 -05:00
brianc
380abbf6a6 start working on parsing 2010-10-23 14:22:47 -05:00
brianc
bfec84bc15 removed reamining references to query 2010-10-23 14:02:44 -05:00
brianc
37bbb21bce collapsed query into client 2010-10-23 13:58:15 -05:00
brianc
cb7717b5b1 updated integration tests 2010-10-23 13:56:38 -05:00
brianc
bdb4d28038 fixed protocol version 2010-10-23 13:28:14 -05:00
brianc
836240dcd8 code cleanup 2010-10-23 12:46:27 -05:00
brianc
d45c905978 added EventEmitter.once compatibility 2010-10-23 12:45:37 -05:00
brianc
65dbfa43ec renamed Client#disconnect to Client#end 2010-10-22 18:28:10 -05:00
brianc
5b1f8aff3b supporting md5 password authentication 2010-10-22 18:16:40 -05:00
brianc
c41c304c7e code cleanup 2010-10-20 00:36:37 -05:00
brianc
21879edc24 refactoring 2010-10-20 00:34:16 -05:00
brianc
c923ae03a5 don't require parser 2010-10-20 00:21:43 -05:00
brianc
7d627f8d15 combined parser and client 2010-10-20 00:21:13 -05:00
brianc
3fe6661819 refactor sending simple messages 2010-10-19 23:49:55 -05:00
brianc
406e8a56a9 got basic password authentication working 2010-10-19 23:29:23 -05:00
brianc
967ec0f6bb parsing ints 2010-10-18 22:12:26 -05:00
brianc
39897a16c7 make a single instance of Parser per client 2010-10-13 22:35:14 -05:00
brianc
1786c73565 downcased first character of message names 2010-10-12 22:01:13 -05:00
brianc
5152cfea14 send correct termination code 2010-10-10 23:05:21 -05:00