Commit Graph

3276 Commits (9eaeb51e305fa7bed7c74a290242f9d020a55129)

Author SHA1 Message Date
Jack Christensen 3706b9519f Do not defer in rxMsgHeader
Slightly faster.
2014-06-26 08:39:29 -05:00
Jack Christensen 42c7e1bfce Add binary encoding to date 2014-06-25 18:47:20 -05:00
Jack Christensen aa6e9d0ddf Improve prepared statement performance
* Do not use bufio.Writer - use net.Conn directly
* Use byte slice instead of bytes.Buffer when building query message
* Use binary.BigEndian.* instead of binary.Write
2014-06-23 18:26:15 -05:00
Jack Christensen 3892d8bd70 Use buffered chan for stdlib.Rows
Improved performance slightly
2014-06-21 19:50:59 -05:00
Jack Christensen b1834a527d Fix prepared statement performance with database/sql 2014-06-21 18:28:56 -05:00
Jack Christensen 6bb0a9fa75 Default ConnPool MaxConnections to 5, require min of 2 2014-06-21 18:21:41 -05:00
Jack Christensen 66df58136d Conn Close should release if from pool 2014-06-21 17:38:47 -05:00
Jack Christensen bdb5387646 Fix Open with OpenFromConnPool 2014-06-21 17:33:30 -05:00
Jack Christensen 7d0e178424 Determine automatically if Host is socket
Instead of requiring user to specify either Host or Socket unify these fields.
It can be automatically determined whether it is a socket or not.
2014-06-21 12:53:38 -05:00
Jack Christensen ca9128c3b1 Add test for invalid query 2014-06-21 11:39:28 -05:00
Jack Christensen 09b9964ca7 Add OpenFromConnPool 2014-06-21 11:34:56 -05:00
Jack Christensen eb85aad21f Conn implements driver.Execer and driver.Queryer 2014-06-21 10:06:45 -05:00
Jack Christensen b2c1a14fcc Update github.com/JackC to github.com/jackc 2014-06-21 08:36:20 -05:00
Jack Christensen d9522a4741 Inform database/sql when connections die 2014-06-20 16:33:51 -05:00
Jack Christensen 839ddcf75f Allow running tests in parallel 2014-06-20 15:27:49 -05:00
Jack Christensen 73b5c73c1c Do not share database connections between tests 2014-06-20 15:18:55 -05:00
Jack Christensen 7a8e80ac0d Make Conn Close idempotent
* die (which is called by Close) now closes underlying connection
2014-06-20 14:50:36 -05:00
Jack Christensen 6c7f173b08 DRY pgx/stdlib tests 2014-06-20 14:09:31 -05:00
Jack Christensen c0e8563b8c Add initial database/sql support 2014-06-20 14:05:16 -05:00
Jack Christensen e014539cde Fix example url_shortener 2014-06-20 14:03:34 -05:00
Jack Christensen 247fd3be53 Fix CommandTag RowsAffected for INSERT 2014-06-20 13:38:01 -05:00
Jack Christensen 51cada7b74 Encoders for ints and floats now convert compatible values
* Any int that fits in the destination int type will be accepted
* Any float that fits in the destination float type will be accepted
2014-06-20 10:48:45 -05:00
Jack Christensen 4efa61bf5b Prepare returns *PreparedStatement 2014-06-20 10:47:31 -05:00
Jack Christensen cc445627b0 Expose DataRowReader FieldDescriptions 2014-06-20 10:46:47 -05:00
Jack Christensen 772c6ca7d7 Remove MessageWriter 2014-06-19 18:10:04 -05:00
Jack Christensen 3b9a1ce659 ValueTranscoder EncodeTo now receives io.Writer 2014-06-19 17:48:26 -05:00
Jack Christensen 884252675e Handle ValueTranscoder EncodeTo returns error on bad type
Instead of panicking
2014-06-19 08:03:14 -05:00
Jack Christensen 5fe3dd7ecf Reduce nesting in message loops 2014-06-17 16:39:44 -05:00
Jack Christensen 928612917d Fix a couple go vet discovered issues 2014-06-11 07:59:43 -05:00
Jack Christensen b982aeb102 Improve logging some more 2014-06-05 17:36:40 -05:00
Jack Christensen ad88123f9c Improve logging 2014-06-04 09:31:54 -05:00
Jack Christensen cbddbb423e Replace logging functionality with log15
gopkg.in/inconshreveable/log15.v2
2014-06-02 19:47:09 -05:00
Jack Christensen 72f584d993 Add QueryArgs 2014-05-21 08:17:24 -05:00
Jack Christensen f119d5221c Add CommandTag 2014-05-19 09:32:31 -05:00
Jack Christensen bc2a120301 Add constants for transaction isolation levels 2014-05-19 08:25:34 -05:00
Jack Christensen 6d6fb4561a ConnPoolConfig embeds ConnConfig 2014-05-19 07:59:51 -05:00
Jack Christensen 9f50796f1b Fix example URL shortener 2014-05-17 13:46:05 -05:00
Jack Christensen 9067b2d991 Rename ConnectionPoolOptions to ConnPoolConfig 2014-05-17 13:44:55 -05:00
Jack Christensen 2da1751e1a Rename ConnectionPoolStat to ConnPoolStat 2014-05-17 13:41:44 -05:00
Jack Christensen f9a2501100 Rename ConnectionPool to ConnPool 2014-05-17 13:40:50 -05:00
Jack Christensen 1ff653ae15 Rename ConnectionParameters to ConnConfig 2014-05-17 13:38:13 -05:00
Jack Christensen 4eb597d20b Rename pgx.Connection to pgx.Conn 2014-05-17 13:11:30 -05:00
Jack Christensen 4f67f16296 Add links to examples
fixes #24
2014-05-09 11:27:17 -05:00
Jack Christensen 13a6cdd66c Add ParseURI 2014-05-09 09:36:09 -05:00
Jack Christensen 8b2a3edb62 ConnectionParameters.Socket now refers to socket directory
This makes PGX behave more like libpq

* But for backward compatibility still accept complete file names.
2014-05-09 08:11:14 -05:00
Jack Christensen 75ca2b3b1c Remove unnecessary read
* Add benchmark for SelectValueTo
2014-04-25 13:49:36 -06:00
Jack Christensen 4829cd4ebc Remove unnecessary read 2014-04-25 12:47:24 -06:00
Jack Christensen a0bfe4eab8 Fix WaitForNotification when it times out 2014-04-25 10:03:11 -06:00
Jack Christensen c6a186a267 Buffer reads - big performance win 2014-04-24 21:44:22 -06:00
Jack Christensen 7ee9b3c7ee Remove unnecessary defer 2014-04-24 21:26:04 -06:00