2
0
Commit Graph

41 Commits

Author SHA1 Message Date
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 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 432c2951c7 Add a lot of documentation 2019-06-08 19:38:34 -05:00
Jack Christensen bf3a27ae3f Update to github.com/jackc/chunkreader/v2 2019-06-08 18:34:35 -05:00
Jack Christensen 18e7e777be Import PortalSuspended from pgx v3
0ab6f80f99
2019-06-08 10:26:26 -05:00
Jack Christensen a340d5f15f CopyFail should be frontend message 2019-05-17 13:27:11 -05:00
Jack Christensen 4acc0f54c6 Import fixes from pgx/pgproto3
Import and adapt commit: fbb8cce
2019-05-03 14:07:55 -05:00
Jack Christensen c116219b62 Update tests to use v2 2019-04-20 13:01:11 -05:00
Jack Christensen 9b6a681f50 Update go.mod version 2019-04-18 23:15:44 -05:00
Jack Christensen 76e904a5a4 CommandComplete.CommandTag is now []byte
Avoid allocation
2019-04-18 23:12:18 -05:00
Jack Christensen 8d43b38287 RowDescription.Name is now []byte
Avoid allocation
2019-04-18 23:12:00 -05:00
Jack Christensen 2acb7b6d4e Reduce mallocs in RowDescription.Decode 2019-04-18 22:33:11 -05:00
Jack Christensen b2a540ca81 Add sufficient support for SCRAM 2019-04-16 20:30:55 -05:00
Jack Christensen 97a0ac4ddc Clarify ChunkReader.Next contract 2019-03-30 12:52:55 -05:00
Jack Christensen bb06e6b3ff Decouple github.com/jackc/chunkreader 2019-03-30 12:46:56 -05:00
Jack Christensen 127e997696 Add travis CI 2019-03-30 12:33:04 -05:00
Jack Christensen b9d0da5558 Add readme, license, and docs 2019-03-30 12:32:39 -05:00
Jack Christensen 16176b5151 Add go module support 2019-03-30 12:26:24 -05:00
Jack Christensen 440fbf1581 Include missed changes 2019-01-26 12:21:54 -06:00
Jack Christensen 38671ea106 Properly abort CopyFrom on reader error 2019-01-26 10:21:16 -06:00
Josh Leverette 66af2227c0 Fix encoding of ErrorResponse 2019-01-19 11:42:30 -06:00
Jack Christensen a24d764440 Back out of some over optimization 2019-01-02 18:16:08 -06:00
Jack Christensen 7bd9b776cd Remove another allocation 2019-01-01 13:52:04 -06:00
Jack Christensen f225b3d4a1 Avoid allocating strings in common message types 2019-01-01 13:47:37 -06:00
Jack Christensen 64b1ecf96f Type modifier should be int32 not uint32 2018-09-22 07:43:18 -05:00
Murat Kabilov 5f39bbaf35 Add *Conn. CopyFromTextual, CopyToTextual, which use textual format for copying data 2018-07-31 08:57:53 +02:00
Jack Christensen b3d0cbd0e6 Fix reading interrupted messages
When an message is received and a timeout occurs after reading the
header but before reading the entire body the connection state could
be corrupted due to the header being consumed. The next read would
consider the body of the previous message as the header for the next.

fixes #348
2017-12-16 13:45:22 -06:00
Jack Christensen ffa9ff2213 Use github.com/pkg/errors 2017-06-04 21:30:03 -05:00
Jack Christensen 8e404a02a3 Ensure pgproto3.Parse.Decode overwrites itself entirely 2017-05-29 11:24:49 -05:00
Jack Christensen d6312305ae Replace MarshalBinary with Encode
This new approach can avoid allocations.
2017-05-26 17:00:44 -05:00
Jack Christensen b1934ad4c2 Add flush and close messages to pgproto3 2017-05-19 17:31:22 -05:00
Jack Christensen e45a42c7ef Do not create empty slices in Bind.Decode 2017-05-19 15:50:27 -05:00
Jack Christensen c6aef15181 Add basic pgmock support
Primarily useful for testing pgx itself. Design is still subject to change.
2017-05-13 17:56:54 -05:00
Jack Christensen 80edb27dee Fix Bind Decode to advance rp 2017-05-13 16:19:55 -05:00
Jack Christensen 61d4386931 Update pgproto3 to enable pgmock 2017-05-06 08:48:40 -05:00
Jack Christensen eb9fc6e7a5 Fix queries with more than 32 columns
fixes #270
2017-05-01 19:46:37 -05:00
Jack Christensen d25abf5674 Add pgproto3.Backend 2017-05-01 18:11:55 -05:00
Jack Christensen eff55451cf Reduce allocations and copies in pgproto3
Altered chunkreader to never reuse memory.

Altered pgproto3 to to copy memory when decoding. Renamed UnmarshalBinary to
Decode because of changed semantics.
2017-04-29 11:55:14 -05:00
Jack Christensen de9bb7e6d8 Use flyweight pattern for pgproto3 messages 2017-04-29 11:01:54 -05:00
Jack Christensen 4e2900b774 Introduce pgproto3 package
pgproto3 will wrap the message encoding and decoding for the PostgreSQL
frontend/backend protocol version 3.
2017-04-29 10:02:38 -05:00