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
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
Jack Christensen
73bd33b215
Do not encode Go float64 to a PostgreSQL float4
...
The automatic conversion of float64 to float32 could cause loss of
precision.
2015-12-21 13:12:11 -06:00
Jack Christensen
8577dccd65
Make ConnPoll stress test time based
...
Test now runs for fixed amount of time instead of a fixed number of iterations.
This should enable TravisCI to finish the test.
2015-12-12 17:35:24 -06:00
Jack Christensen
d84ee5c18a
Remove dead code
2015-12-12 13:20:44 -06:00
Jack Christensen
08f927ca7e
Update CHANGELOG
2015-12-12 13:18:38 -06:00
Jack Christensen
f004f0802c
Add ConnPool.Reset method
...
refs #110
2015-12-12 13:15:14 -06:00
Jack Christensen
1eecea606b
Tweak doc.go so section head is detected
2015-12-09 12:00:33 -06:00
Blake Gentry
6fc16d96c7
fix copy/paste doc mistakes
...
refer to the correct field names in docs for for all nullable types
2015-11-29 21:59:42 -08:00
Jack Christensen
edfdaf15c6
Rows.Scan errors now include which argument caused error
2015-11-20 14:02:49 -06:00
Jack Christensen
dd26ad0091
Remove unreachable code
2015-11-14 14:14:52 -06:00
Jack Christensen
b5901f7dba
Fix skip JSON tests for old servers
2015-11-12 15:43:48 -06:00
Jack Christensen
09e0cc4815
Skip JSON tests for old PostgreSQL servers
2015-11-12 15:27:20 -06:00
Jack Christensen
e1215d9b19
[]byte skips encoding/decoding
...
refs #104
2015-11-12 14:54:25 -06:00
Jack Christensen
26bb780063
inet is known type now -- so use point instead
2015-11-12 13:41:00 -06:00
Jack Christensen
69102e4463
test ipv4 for travis simplicity
2015-10-26 19:08:15 -05:00
Jack Christensen
db57394741
test ipv4 for travis simplicity
2015-10-26 18:13:35 -05:00
Jack Christensen
de41977104
Run short tests on travis to avoid failure due to too long tests
2015-10-26 17:43:30 -05:00
Jack Christensen
b7b7a83471
Test on travis with Go 1.5
2015-10-26 17:40:35 -05:00
Jack Christensen
3262ee23f3
Release 2.7.1
v2.7.1
2015-10-26 12:09:46 -05:00
Jack Christensen
60cca3de7d
Disable SSL renegotiation
...
fixes #103
2015-10-26 12:07:54 -05:00
Jack Christensen
1e9206fc6c
Release v2.7.0
v2.7.0
2015-10-16 16:37:45 -05:00
Jack Christensen
7e668f54fe
Update changelog
2015-10-16 16:18:31 -05:00
Jack Christensen
8d9eb62609
Add docs for relating to ConnConfig.RuntimeParams
2015-10-16 16:16:39 -05:00
Jack Christensen
ec8f6259e6
ParseEnvLibpq extracts PGAPPNAME
2015-10-16 16:13:15 -05:00
Jack Christensen
829d61ce40
ParseDSN extracts RuntimeParams
2015-10-16 15:48:24 -05:00
Jack Christensen
5b0550c1cb
ParseURI extracts run-time parameters
...
refs #99
2015-10-16 15:37:49 -05:00
Jack Christensen
1fb63a4b41
Add RuntimeParams to ConnConfig
2015-10-16 15:37:32 -05:00
Jack Christensen
355a3854db
Update changelog
2015-10-16 15:01:40 -05:00
Jack Christensen
41b96b5f77
Fix stdlib error caused by idempotent Prepare
2015-10-16 14:58:03 -05:00
Jack Christensen
984eace2b5
Make *Conn.Prepare idempotent.
...
fixes #94
2015-10-16 14:17:07 -05:00
Jack Christensen
c668caeb31
Fix error message in tests.
2015-10-16 14:15:26 -05:00
Jack Christensen
7dfdc92855
Rows.Values supports oid type
2015-10-07 08:00:43 -05:00
Jack Christensen and Jake Worth
c726a51450
Add inet[] and cidr[] support
2015-09-29 13:23:26 -05:00