Commit Graph

23 Commits (64b4414efcd1222c271277bd011d19a0f8fbef3c)

Author SHA1 Message Date
Jack Christensen 583c8d3b25 Use pgproto3.FieldDescription instead of pgx version
This allows removing a malloc and memcpy.
2019-05-04 13:47:18 -05:00
Jack Christensen d93de3fdc7 Add CopyFrom to pool 2019-04-25 15:35:53 -05:00
Jack Christensen cc3461e65d Use golang.org/x/xerrors 2019-04-20 17:43:44 -05:00
Jack Christensen 66625e6489 Prepare takes context
Also remove PrepareEx. It's primary usage was for context. Supplying
parameter OIDs is unnecessary when you can type cast in the query SQL.
If it does become necessary or desirable to add options back it can be
added in a backwards compatible way by adding a varargs as last
argument.
2019-04-20 11:47:16 -05:00
Jack Christensen dc699cefc7 Conn.CopyFrom takes context 2019-04-20 11:38:23 -05:00
Jack Christensen 858d00788a Use extracted packages with Go modules 2019-04-05 10:59:47 -05:00
Jack Christensen d3a2c1c107 Partial conversion of pgx to use pgconn 2019-01-26 16:46:30 -06:00
Jack Christensen e78fd95296 Fix switching CommandTag back to string 2019-01-05 18:53:07 -06:00
Jack Christensen 7f9540438c pgx uses pgconn.CommandTag instead of own definition 2019-01-01 16:55:48 -06:00
Jack Christensen 1ff8024df9 Access underlying net.Conn via method
Also remove some dead code.
2018-12-31 18:00:08 -06:00
Jack Christensen b63370e5d5 Rename base.Conn to base.PgConn
- pgx.Conn embeds base.PgConn privately
- Add pgx.Conn.ParameterStatus
2018-12-28 12:16:50 -06:00
Jack Christensen 25f21a597c Merge branch 'nvorobev-rows-affected-for-copyto-copyfrom' into v4-experimental 2018-12-15 17:26:48 -06:00
Nikolay Vorobev a0331e7409 Adds RowsAffected for CopyToWriter and CopyFromReader 2018-12-13 12:54:42 +03:00
Jack Christensen 2e72ca854a First extraction of base.Conn 2018-11-10 18:48:43 -06:00
Fredrik Petrini c6cec81e2c Fix: Handle (n > 0 and err == io.EOF) in CopyFromReader as per io.Reader documentation 2018-10-08 11:39:18 +02:00
Murat Kabilov 4e9a696434 addressing the comments
add copy methods to the Tx struct
2018-08-07 23:44:02 +03:00
Murat Kabilov 5315995dfa Add *Conn. CopyFromTextual, CopyToTextual, which use textual format for copying data 2018-07-31 08:57:53 +02:00
Jack Christensen 20c02acd63 Fix deadlock when CopyFromSource panics
fixes #433
2018-07-14 11:26:09 -05:00
Jack Christensen 8f4178b3d3 Use github.com/pkg/errors 2017-06-04 21:30:03 -05:00
Jack Christensen 458dd24a9f Remove unneeded WriteBuf 2017-05-02 21:39:23 -05:00
Jack Christensen f04c58338b 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
Jack Christensen a636ef31a4 Refactor encoding parameters for prepared statements 2017-03-18 14:23:04 -05:00
Jack Christensen 5eb19bc66a Add *Conn.CopyFrom
This replaces *Conn.CopyTo. CopyTo was named incorrectly. In PostgreSQL
COPY FROM is the command that copies from the client to the server. In
addition, CopyTo does not accept a schema qualified table name. This
commit introduces the Identifier type which handles multi-part names and
correctly quotes/sanitizes them. The new CopyFrom method uses this
Identifier type.

Conn.CopyTo is deprecated.

refs #243 and #190
2017-03-17 08:25:49 -05:00