Jack Christensen
2fabfa3c18
Update to newest pgproto3
2019-08-31 15:44:54 -05:00
Jack Christensen
0d1ceed7a6
Refactor authentication message handling
2019-08-31 15:43:07 -05:00
Jack Christensen
439ea11d47
NewFrontend and NewBackend cannot fail
2019-08-31 14:49:55 -05:00
Jack Christensen
04a0609876
Remove unused pgmock code
2019-08-31 13:13:45 -05:00
Jack Christensen
c72417a958
Merge pull request #591 from vcabbage/acquireex
...
Add ConnPool.AcquireEx
2019-08-31 13:01:01 -05:00
Kale Blankenship
78f498fc43
Add ConnPool.AcquireEx
2019-08-31 10:33:20 -07:00
Jack Christensen
6bba3c4810
Update pgproto3
2019-08-31 11:55:02 -05:00
Jack Christensen
2bc8f2e6af
Remove pkg/errors package
2019-08-31 11:53:26 -05:00
Jack Christensen
1ba5dcbe01
Support SSLRequest and CancelRequest
2019-08-31 11:48:01 -05:00
Jack Christensen
53921a0a22
Allow reading a result row multiple times
...
refs #478
2019-08-31 10:50:14 -05:00
Jack Christensen
f20f026b7d
Pool BeforeAcquire hook takes context
2019-08-31 08:57:03 -05:00
Jack Christensen
4d06b1b8ad
Merge pull request #589 from vcabbage/pool-prepare-oids
...
Include ParameterOIDs when preparing statements on new pool connections
2019-08-28 16:12:36 -05:00
Kale Blankenship
12c6319244
Include ParameterOIDs when preparing statements on new pool connections
...
ParameterOIDs passed to ConnPool.PrepareEx are used to prepare the statement
on existing connections in the pool. If additional connections are later
created ParameterOIDs are omitted, potentially causing query failures.
2019-08-28 13:07:24 -07:00
Jack Christensen
486d64daed
Update pgtype and pgproto
v4.0.0-pre2
2019-08-27 21:18:25 -05:00
Jack Christensen
76538434cf
MarshalJSON should be defined on T not *T
...
Otherwise "%v" format would be used by json.Marshal(T).
2019-08-27 21:13:45 -05:00
Jack Christensen
a8802b16cc
Value, EncodeBinary, EncodeText, and MarshalJSON on T instead of *T
...
Methods defined on T are also available on *T. This change makes Value
consistent with database/sql Value implementations. It also makes Value,
EncodeBinary, and EncodeText more convenient to use because you can
pass T or *T as an argument to a query.
The MarshalJSON change is even more significant because without it
json.Marshal would generate the "%v" format instead of the implemented
MarshalJSON.
Thought this technically changes the interface, because *T will be
automatically dereferenced as needed it shouldn't be a breaking change.
See: https://github.com/jackc/pgx/issues/538 for initial discussion.
2019-08-27 20:46:16 -05:00
Jack Christensen
4a320500cf
Remove barely used ProtocolError type
2019-08-27 18:31:54 -05:00
Jack Christensen
863b41aaa6
Remove unused sentinal error
2019-08-27 18:29:38 -05:00
Jack Christensen
28d5375b74
Update stdlib for latest pgconn
2019-08-27 18:29:27 -05:00
Jack Christensen
ddd9cf451e
Update pgxpool for latest pgconn
2019-08-27 18:29:14 -05:00
Jack Christensen
8170eaf401
Update to latest version of pgconn
...
- Also remove a few tests of functionality that is handled by pgconn
2019-08-27 18:22:34 -05:00
Jack Christensen
66aaed7c9e
Remove public fields from PgConn
...
- Access TxStatus via method
- Make Config private
fixes #7
2019-08-27 18:11:50 -05:00
Jack Christensen
138254da5b
Refactor errors
...
- Use strongly typed errors internally
- SafeToRetry(error) streamlines retry logic over ErrNoBytesSent
- Timeout(error) removes the need to choose between returning a context
and an i/o error
2019-08-27 18:05:50 -05:00
Jack Christensen
169632e028
Refactor format code choosing
2019-08-25 00:38:50 -05:00
Jack Christensen
b1e25e4ea4
Add format code helpers to ConnInfo
2019-08-25 00:32:11 -05:00
Jack Christensen
8f080dcbb2
Update pgconn for access to min_read_buffer_size param
2019-08-25 00:23:07 -05:00
Jack Christensen
e6cf51b304
Expose min_read_buffer_size config param
2019-08-25 00:22:32 -05:00
Jack Christensen
595d09d6f1
Build fully operational Frontend
2019-08-24 23:57:24 -05:00
Jack Christensen
a262126b5c
Replace IsAlive with IsClosed
...
IsAlive is ambiguous because the connection may be dead and we do not
know it. It implies the possibility of a ping. IsClosed is clearer -- it
does not promise the connection is alive only that it hasn't been
closed.
2019-08-24 23:49:59 -05:00
Jack Christensen
6feea0c1c5
Replace IsAlive with IsClosed
...
IsAlive is ambiguous because the connection may be dead and we do not
know it. It implies the possibility of a ping. IsClosed is clearer -- it
does not promise the connection is alive only that it hasn't been
closed.
fixes #2
2019-08-24 23:43:26 -05:00
Jack Christensen
d5a6a5e7e0
Remove Results suffix from BatchResults methods
2019-08-24 23:41:28 -05:00
Jack Christensen
64b07f0d66
Batch uses statement cache.
...
This streamlines Queue's interface as well.
2019-08-24 23:40:21 -05:00
Jack Christensen
6508934508
Rename PreparedStatementCache to StatementCache
2019-08-24 22:19:29 -05:00
Jack Christensen
61f0710101
Add docs and tests for PgBouncer
2019-08-24 22:12:55 -05:00
Jack Christensen
7f5e702d1a
Fix benchmarks
2019-08-24 21:04:40 -05:00
Jack Christensen
12c1167147
Fix benchmarks now that date is UTC time
2019-08-24 20:57:15 -05:00
Jack Christensen
b2b949afa4
Rename BeginEx to BeginTx and update docs
2019-08-24 20:50:24 -05:00
Jack Christensen
ebf88b691f
Rewrap doc.go
2019-08-24 20:46:36 -05:00
Jack Christensen
3675337e5b
Update for rename of pgconn.PreparedStatementDescription
2019-08-24 20:44:56 -05:00
Jack Christensen
da9fc85c44
Rename PreparedStatementDescription to StatementDescription
...
PreparedStatementDescription was too long. It also no longer entirely
represents its purpose now that it is also intended for use with
described statements.
2019-08-24 20:39:03 -05:00
Jack Christensen
0c3e59b07a
Add automatic statement cache
2019-08-24 20:29:54 -05:00
Jack Christensen
78abbdf1d7
Rename LRUCache to LRU
2019-08-24 19:48:43 -05:00
Jack Christensen
bcd6b9244a
Rename pscache to stmtcache
2019-08-24 19:46:14 -05:00
Jack Christensen
beba629bb5
Fix result reader returned by locked conn
2019-08-24 17:18:29 -05:00
Jack Christensen
180dfe6954
Remove bad error check
2019-08-24 16:29:44 -05:00
Jack Christensen
2209d2e36a
Rename mode constants
2019-08-24 16:27:54 -05:00
Jack Christensen
797a44bf04
Rename BuildFrontendFunc to BuildFrontend
...
For consistency with other functions supplied in Config.
2019-08-24 16:18:04 -05:00
Jack Christensen
e6bd739067
Add pscache package
2019-08-24 16:02:27 -05:00
Jack Christensen
31705e586a
Use pgconn.PreparedStatementDescription directly
...
Instead of having similar pgx.PreparedStatement
2019-08-24 14:29:05 -05:00
Jack Christensen
e540a05760
Fix typo in docs
2019-08-24 14:16:38 -05:00