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
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
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
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
e540a05760
Fix typo in docs
2019-08-24 14:16:38 -05:00
Jack Christensen
760dd75542
Require Config to be created by ParseConfig
2019-08-24 09:28:44 -05:00
Jack Christensen
1558987979
ReceiveMessage returns context error instead of io error on cancel
2019-08-22 20:11:27 -05:00
Jack Christensen
11255efe7a
Make ErrorResponseToPgError public
2019-08-20 15:49:57 -05:00
Jack Christensen
d364370a31
Add SendBytes and ReceiveMessage
2019-08-20 14:12:07 -05:00
Jack Christensen
0a2ed72cf7
Merge pull request #10 from furdarius/configurable-chunkreader-buf
...
Configurable chunkreader buffer size
2019-08-08 15:49:17 -05:00
Artemiy Ryabinkov
c9660e30c8
Use go mod download to install deps on travis-ci. Add cache for travis-ci.
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-08-08 13:12:27 +03:00
Artemiy Ryabinkov
dbb7aa8fd5
Add GOPROXY to travis builds to mitigate problems with github and etc
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-08-08 12:52:04 +03:00
Artemiy Ryabinkov
0a99b543c0
Add BuildFrontendFunc in Config
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-08-08 11:46:25 +03:00
Jack Christensen
f0b479097a
Fix missing deferred constraint violations in certain conditions
...
See https://github.com/jackc/pgx/issues/570 .
2019-08-06 17:07:11 -05:00
Artemiy Ryabinkov
fa7e06489b
Add MinReadBufferSize option to Config
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-07-26 11:14:07 +03:00
Artemiy Ryabinkov
b599a26399
Merge pull request #1 from jackc/master
...
Sync
2019-07-26 10:58:16 +03:00
Jack Christensen
3dec184811
Split ValidateConnect from AfterConnect
...
This avoids the foot-gun of ParseConfig setting AfterConnect because of
target_session_attrs and the user inadvertently overriding it with an
AfterConnect designed to setup the connection.
Now target_session_attrs will be handled with ValidateConnect.
2019-07-13 10:22:09 -05:00
Jack Christensen
59941377c8
Rename Config.AfterConnectFunc to AfterConnect
...
No need to include the type in the name.
2019-07-13 09:52:22 -05:00
Jack Christensen
d2440c7fe6
Improve documentation
2019-06-22 16:54:10 -05:00
Jack Christensen
731f1eadf5
Merge pull request #1 from furdarius/linters-fixes
...
Fix linters notifications
2019-06-22 16:33:39 -04:00
Artemiy Ryabinkov
07904bd774
Remove unnecassary ctx cancel
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-22 20:09:55 +03:00
Artemiy Ryabinkov
54ce9c6bb8
Update pgproto3 dependency
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-22 14:35:17 +03:00
Artemiy Ryabinkov
529805557f
Fix linters notifications
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-22 10:41:01 +03:00
Jack Christensen
a97dd2f9f6
Update test envvar and docs
2019-06-01 09:59:04 -05:00
Jack Christensen
71ec1f7821
Update xerrors package
2019-05-28 06:54:20 -05:00
Jack Christensen
de87e8be96
Fix: Use fallback config TLS config
2019-05-27 12:50:27 -05:00
Jack Christensen
d30cf1c19f
Adjust buffer size for CopyFrom
2019-05-09 15:15:40 -05:00
Jack Christensen
1baf0ef57e
Refactor context handling into ctxwatch package
2019-05-07 18:05:06 -05:00
Jack Christensen
1e3961bd0e
Fix flickering test
2019-04-24 16:49:52 -05:00
Jack Christensen
23a91ebc90
auth_scram.go file comment should not be part of docs
2019-04-24 16:08:12 -05:00
Jack Christensen
7e0022ef6b
Tag errors if no bytes sent to server
2019-04-20 16:48:24 -05:00
Jack Christensen
0f8e1d30e2
Link context errors and underlying conn errors
...
Using golang.org/x/xerrors type errors both errors can be exposed.
2019-04-20 15:53:30 -05:00
Jack Christensen
f3b5f6b275
Allow skipping TestConnExecBatchHuge in short mode
2019-04-20 15:34:49 -05:00
Jack Christensen
7a520059d9
Update to remove pgprotov3 ref
2019-04-20 13:01:59 -05:00
Jack Christensen
cd629965e6
Use golang.org/x/xerrors
2019-04-20 12:57:52 -05:00
Jack Christensen
39e6ff5766
Prevent deadlock with huge batches
2019-04-20 11:11:09 -05:00
Jack Christensen
9f774761ba
Fix TestConnLocking
2019-04-20 10:59:50 -05:00
Jack Christensen
3710e52a9a
Add named error for conn busy
2019-04-19 16:16:55 -05:00
Jack Christensen
7bb6c2f3e9
Unify locked and closed into status
...
No longer panic on locking busy conn
2019-04-19 15:52:12 -05:00
Jack Christensen
16412e56e2
0 alloc context to deadline
2019-04-19 14:43:09 -05:00
Jack Christensen
2383561e4d
Use 0-alloc pgproto3/v2
2019-04-18 23:17:28 -05:00
Jack Christensen
9d30dad837
Do not buffer results in benchmarks
2019-04-18 22:52:07 -05:00
Jack Christensen
b6e5b74e2c
Reuse one MultiResultReader per connection
...
Using a PgConn while locked now panics. i.e. You must Close any
ResultReader or MultiResultReader.
2019-04-18 22:50:36 -05:00
Jack Christensen
bc139fadb5
Reuse one ResultReader per connection
2019-04-18 22:01:47 -05:00
Jack Christensen
e948dc3246
Reuse buffer for writing
2019-04-18 21:51:58 -05:00
Jack Christensen
0174907e04
Fix travis unix domain socket test
2019-04-16 20:58:10 -05:00