82 Commits

Author SHA1 Message Date
Jack Christensen
f14fb3d692 Replace interface{} with any 2022-04-09 09:12:55 -05:00
Jack Christensen
8e341e20f3 Remove ConnConfig.BuildStatementCache 2022-03-12 09:23:40 -06:00
Jack Christensen
f27178ba85 Initial privatization of stmtcache
ConnConfig.BuildStatementCache is pending removal once connections
always have separate caches for prepared and described statements.
2022-03-12 08:35:31 -06:00
Jack Christensen
1f2f239d09 Renamed pgtype.ConnInfo to pgtype.Map 2022-02-21 09:13:09 -06:00
Jack Christensen
bda10b2ec9 Rename pgtype.DataType to pgtype.Type 2022-02-21 09:01:48 -06:00
Jack Christensen
a3c351d11a RegisterDataType now accepts *DataType 2022-02-21 08:49:04 -06:00
Jack Christensen
ae9be0b99e Replace EnumType with EnumCodec 2022-01-11 20:46:10 -06:00
Jack Christensen
0c0e28a70a Convert int4 and int8 to new system
Note: purposely disabled some tests and composite support that needs to
be restored later in v5 development.
2022-01-01 17:26:39 -06:00
Jack Christensen
72cc95e4dd Bump module version to v5 2021-12-11 13:29:03 -06:00
Jack Christensen
0e293b966c Finish import of pgconn 2021-12-04 14:06:57 -06:00
Jack Christensen
7e13db4538 Finish import of pgtype repo
Fix some tests that broke by merging repos
Tweak readme wording
2021-12-04 13:45:57 -06:00
Jack Christensen
0e04d8187e Add raw benchmark 2020-06-01 08:53:45 -05:00
Jack Christensen
bcdbb9f657 Tweak benchmarks to account for slow binary formats
See https://www.postgresql.org/message-id/CAMovtNoHFod2jMAKQjjxv209PCTJx5Kc66anwWvX0mEiaXwgmA%40mail.gmail.com
2020-05-25 11:18:11 -05:00
Jack Christensen
8faa1f5096 Fix off by one error with number of rows benchmark 2020-05-16 18:43:22 -05:00
Jack Christensen
dea915e605 Compare binary and text format through pgx
Make ID field bigger -- otherwise all ints are less than 4 digits and
get a bit too much of an advantage in text vs. binary
2020-05-07 22:28:46 -05:00
Jack Christensen
e439372d2a Add multi-row select benchmarks 2020-05-07 22:28:46 -05:00
Jack Christensen
f9ce8af5c9 Add explicit enum support 2020-05-07 22:28:46 -05:00
Jack Christensen
3b8cd87875 Remove QueryArgs
An external SQL builder like github.com/jackc/pgsql should be used
instead.
2019-09-02 09:58:11 -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
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
0c3e59b07a Add automatic statement cache 2019-08-24 20:29:54 -05:00
Jack Christensen
c3e41872a8 Resplit Begin and BeginEx
This is in preparation for a Begin / Tx interface that will similate
nested transactions with savepoints.

In addition, this passes the TxOptions struct by value and thereby
removes an allocation.
2019-08-17 15:53:55 -05:00
Jack Christensen
f3c703a102 Remove Conn SetLogger and SetLogLevel
Simplifying interface
2019-08-17 15:34:29 -05:00
Jack Christensen
3028821487 Add context.Context to Logger interface
This allows custom logger adapters to add additional fields to log
messages. For example, a HTTP server may with to log the request ID.

fixes #428
2019-08-03 16:16:21 -05:00
Jack Christensen
f572b336b1 Improve pool Acquire / Release performance
Release was using a goroutine every time. Now it only starts a goroutine
when doing something that may take a while. (Destroy and afterRelease)
2019-05-04 17:36:08 -05:00
Jack Christensen
85ddbfeeee Remove 2 mallocs from query path 2019-05-04 08:55:05 -05:00
Jack Christensen
aed6b822d9 Split batch command and result 2019-04-24 16:39:06 -05:00
Jack Christensen
2263521f70 Only have a single Begin transaction method 2019-04-24 13:35:27 -05:00
Jack Christensen
1b8f0016e9 Split pgtype into own repo 2019-04-20 19:20:00 -05:00
Jack Christensen
efb333df6b Fix go modules
Wow. This is fun. Sure is easy to get modules wrong when upgrading a v2+
project.
2019-04-20 17:41:08 -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
54c6ddc2f0 Commit and Rollback take context
Remove Ex versions.
2019-04-10 12:22:12 -05:00
Jack Christensen
7718ee6207 Remove Ex versions of Query and QueryRow
Always require context and prepend options to arguments if necessary.
2019-04-10 12:12:22 -05:00
Jack Christensen
77a2da2b46 Replace connection pool 2019-04-10 11:09:42 -05:00
Jack Christensen
d3a2c1c107 Partial conversion of pgx to use pgconn 2019-01-26 16:46:30 -06:00
Jack Christensen
89c3d8af5d Remove ExecEx 2019-01-02 12:52:37 -06:00
Jack Christensen
c672c0d595 Use environment variables for test configuration 2018-12-30 21:52:33 -06:00
Jack Christensen
73f496d7de Finish core batch operations 2017-06-03 11:49:27 -05:00
Jack Christensen
280bce7078 Added log adapter for logrus
Also changed standard logger interface to take a map instead of varargs for
extra data.
2017-04-29 21:28:38 -05:00
Jack Christensen
855b735eae Add log adapters for testing and log15
Make LogLevel a type for Stringer interface.
2017-04-29 20:33:52 -05:00
Jack Christensen
94749e580f Remove CopyTo 2017-03-17 14:18:25 -05:00
Jack Christensen
26d57356f7 Remove old Scanner and Encoder system 2017-03-12 17:22:04 -05:00
Jack Christensen
93e5c68f69 Merge branch 'master' into v3-experimental 2016-12-10 12:21:08 -06:00
Jack Christensen
5f7d01778e Add CopyTo to support PostgreSQL copy protocol
fixes #102
2016-08-10 16:27:44 -05:00
Jack Christensen
390f75c0e1 Reduce Logger interface to Log method 2016-08-02 14:42:31 -05:00
Jack Christensen
06c803253c Add basic benchmark for ConnPoolQueryRow 2016-02-13 13:12:21 -06:00