692 Commits

Author SHA1 Message Date
Jack Christensen
6e2cee6294 Prevent every row scan from causing a malloc 2016-04-30 12:54:16 -05:00
Jack Christensen
e3859aa03e Test should not panic if no err 2016-04-30 12:43:18 -05:00
Jack Christensen
e5ec5851e5 Reduce allocations for row objects 2016-04-30 12:22:36 -05:00
Jack Christensen
acd9c01bd6 Fix ConnPool.Deallocate 2016-04-30 12:22:26 -05:00
Jack Christensen
88acc7e19f Encode and decode between all integer types
fixes #138
2016-04-28 15:28:38 -05:00
Jack Christensen
623ba1eeb1 Add scan to uint16
refs #138
2016-04-27 08:26:59 -05:00
Jack Christensen
d62da82ab1 Support decoding inet/cidr to net.IP
fixes #137
2016-04-22 16:00:11 -05:00
Jack Christensen
5d6d01c41b Merge pull request #135 from konstantin-dzreev/Add_AcquireTimeout_support
Add AcquireTimeout support
2016-04-12 09:09:36 -05:00
konstantin
d4258bb47f Add AcquireTimeout support 2016-04-11 13:35:16 -07:00
Jack Christensen
04e9fbcc55 Fix some golint errors
- Add comments
- Rename variables
- Remove unnecessary "else"
2016-03-29 15:18:09 -05:00
Jack Christensen
129ff96567 TestFatalRxError expects multiple error types 2016-03-24 16:22:27 -05:00
Jack Christensen
9edd770c70 Release 2.8.1 v2.8.1 2016-03-24 15:38:55 -05:00
Jack Christensen
9ce1b2b16e Fix Listen/Unlisten with special characters
fixes #132
2016-03-24 15:26:44 -05:00
Jack Christensen
b8486d6749 Fix Tx.status not being set on error on Commit
fixes #131
2016-03-24 15:11:04 -05:00
Jack Christensen
7947ab561f Update changelog 2016-03-24 14:23:10 -05:00
Jack Christensen
94052ea940 Rows.Scan can ignore column with nil
fixes #130
2016-03-24 14:22:16 -05:00
Jack Christensen
4b843c0a26 Update travis build matrix
Use Go 1.6.0
Add PostgreSQL 9.5
Remove PostgreSQL 9.0 as it is no longer a supported version
  http://www.postgresql.org/support/versioning/
2016-03-23 16:57:59 -05:00
Jack Christensen
05790e007c Fix 32-bit GOARCH
fixes #129
2016-03-23 16:57:31 -05:00
Jack Christensen
410a7646bc Release v2.8.0 v2.8.0 2016-03-18 15:22:35 -05:00
Jack Christensen
0cfdb8bee0 Update changelog 2016-03-18 15:10:32 -05:00
m1kc (Max Musatov)
aac1fd86a4 []uint16, []uint32, and []uint64 encoding and decoding. 2016-03-17 12:14:48 +03:00
Jack Christensen
34b1711eef Tweak test for old versions of PostgreSQL
It seems on TravisCI that old versions of PostgreSQL may return an
error on select 1/0 such that Query errors instead of Scan.
2016-03-15 19:37:38 -05:00
Jack Christensen
49b3582977 Fix connection corruption when errored query closes early
refs #125
2016-03-15 19:20:03 -05:00
Jack Christensen
d88242b0ca Tweak error reporting on TestFatalRxError 2016-03-15 08:28:07 -05:00
Jack Christensen
f12ae84ac5 Update changelog 2016-03-11 07:58:51 -06:00
Jack Christensen
935bfb6f44 Merge branch 'master' of git://github.com/utrack/pgx into utrack-master 2016-03-11 07:51:20 -06:00
Nick K
7f9f79656b Fixed typo for uint64 data loss checks' error 2016-03-11 11:54:07 +03:00
Nick K
0ea1a5245c Now throwing errors on uint32/uint64 possible data loss 2016-03-11 11:52:21 +03:00
Jack Christensen
49b82deee4 Merge pull request #122 from AlekSi/patch-1
Fix typo in README
2016-03-07 07:37:45 -06:00
Alexey Palazhchenko
084a0d6778 Fix typo in README 2016-03-06 18:57:42 +03:00
Jack Christensen
1ad4c0090a Add ConnPool Prepare and Deallocate
fixes #68
2016-03-04 16:26:27 -06:00
Jack Christensen
20d22a67e3 Prevent deadlock on ConnPool.Acquire with Reset
If no connections are available, and the pool is reset, there will
be no connections at all in the pool. So the pool needs to be able
to create a connection after waiting for a connection to be released.
2016-03-04 16:19:48 -06:00
Nick K
e40f08e107 Added uint encoder/decoder 2016-03-04 11:25:28 +03:00
Jack Christensen
c6b6d7bad7 Expose encoding and decoding functions 2016-02-15 13:57:11 -06:00
Jack Christensen
30feade829 Fix encodeJson returning err 2016-02-15 12:40:13 -06:00
Jack Christensen
c5468f3037 Fix go vet identified composite leteral uses unkeyed fields 2016-02-15 12:36:48 -06:00
Jack Christensen
9d7cf39563 Fix go vet identified format strings 2016-02-15 12:32:24 -06:00
Jack Christensen
5679574bca Update changelog 2016-02-13 13:36:37 -06:00
Jack Christensen
06c803253c Add basic benchmark for ConnPoolQueryRow 2016-02-13 13:12:21 -06:00
Jack Christensen
a93025479d Add AfterClose and Conn to Rows 2016-02-13 13:03:06 -06:00
Jack Christensen
74b33db979 Fix unrecognized commit failure
Also add *Tx.Status() and *Tx.Err()
2016-02-13 12:47:06 -06:00
Jack Christensen
470002ec13 Fix test of *Tx.AfterClose order 2016-02-13 12:12:01 -06:00
Jack Christensen
593ab9fde2 Add *Tx.Conn getter method 2016-02-13 11:07:20 -06:00
Jack Christensen
e8dcf5b3ac Add *Tx.AfterClose hook
ConnPool now implements its connection with Tx via this hook instead of
manipulating the internals of Tx.
2016-02-13 11:06:44 -06:00
Jack Christensen
0f7bf19387 Add *Conn.SetLogLevel
Allow changing log level after connection is established. Because
log level and loggers can be set independently, it is now possible
to have a log level above none when there is a nil logger. This
means all log statements need to check for nil logger and an
appropriate log level. This check has been factored out into
*Conn.shouldLog.
2016-02-13 10:13:10 -06:00
Jack Christensen
cffae7ff5d Add SetLogger to *Conn
Allow replacing logger after connection is established. Also
refactor internals of logging such that there is a log method that
adds the pid to all log calls instead of making a new logger object.
The reason for this is so pid will be logged regardless of whether
loggers are replaced and restored.
2016-02-12 17:49:04 -06:00
Jack Christensen
beed0c0e5f Fix (r *msgReader) rxMsg() error guard clause
rxMsg() has a guard clause that checks if the msgReader has already
encountered an error. It should return that pre-existing error. It
was incorrectly returning a local `err` variable instead of `r.err`.
2016-01-29 16:30:15 -06:00
Jack Christensen
9f9a9779ac Add compatibility with database/sql custom types
Support database/sql.Scanner
Support database/sql/driver.Valuer
2015-12-31 14:46:43 -06:00
Jack Christensen
029bd49065 Update travis to GO 1.5.2 2015-12-22 10:47:44 -06:00
Jack Christensen
7b5d247a46 Remove -cover from travis build
Coverage is not checked in travis so all it does is slow down the build.
2015-12-22 10:46:42 -06:00