Commit Graph

3081 Commits (2e7b46d5d7454daf0859dd48f8a8e190995164c5)

Author SHA1 Message Date
Patrick Audley 9f23ed84ba Minor typo in Changelog 2022-03-21 09:01:46 -05:00
Jack Christensen 8c18d7808b Add documentation 2022-03-19 17:01:12 -05:00
Jack Christensen 72b72b9ae9 Remove dead code 2022-03-12 15:07:32 -06:00
Jack Christensen cb721dfb5b SendBatch supports default QueryExecMode 2022-03-12 15:06:13 -06:00
Jack Christensen 1390a11fe2 Query supports QueryExecMode
Fixed QueryExecModeExec as it must only use text format without
specifying param OIDs.
2022-03-12 14:15:39 -06:00
Jack Christensen 0c166c7620 Fix BC dates in text format 2022-03-12 12:47:01 -06:00
Jack Christensen 46966227bc Enable all QueryExecModes for exec path 2022-03-12 10:04:02 -06: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 fe21cc7486 Use Map.Encode path for simple protocol 2022-03-05 21:40:49 -06:00
Jack Christensen c4b08378f2 Handle driver.Valuers inside Map.Encode 2022-03-05 21:27:17 -06:00
Jack Christensen 0905d1f452 Register more default types and handle unknown types better 2022-03-05 21:19:58 -06:00
Jack Christensen 2831eedef3 Simplify copy encoding 2022-03-05 20:27:36 -06:00
Jack Christensen e5685a34fc Simplify encoding extended query arguments 2022-03-05 20:16:57 -06:00
Jack Christensen 1cef9075d9 Simply typed nil and driver.Valuer handling
* Convert typed nils to untyped nils at beginning of encoding process.
* Restore v4 json/jsonb null behavior
* Add anynil internal package
2022-03-05 19:53:59 -06:00
Jack Christensen 39d2e3dc3f Move chooseParameterFormatCode 2022-03-05 15:16:12 -06:00
Jack Christensen 0d8e109c21 Test every QueryExecMode 2022-03-05 14:04:51 -06:00
Jack Christensen aad3d65e16 Initial restructure of simple protocol to query exec mode 2022-03-05 10:27:15 -06:00
Jack Christensen 2885b039d5 Rename Uint32 field to include bit size
i.e. Uint renamed to Uint32. This matches the pattern set by the
database/sql types.
2022-03-05 09:23:25 -06:00
Jack Christensen 84a3d91322 pgtype Float4 and Float8 fields include bit size
e.g. Instead of Float it is Float64. This matches the pattern set by the
database/sql types.
2022-03-05 09:20:03 -06:00
Jack Christensen d723a4ab6f pgtype Int2, Int4, and Int8 fields include bit size
e.g. Instead of Int it is Int64. This matches the pattern set by the
database/sql types.
2022-03-05 09:17:31 -06:00
Jack Christensen 872a7a9315 Fix pgtype/int.go.erb 2022-03-05 09:08:14 -06:00
Jack Christensen e7f90ba6e4 Remove unused pgtype.Map field 2022-03-05 09:00:49 -06:00
Jack Christensen ec8f7c4204 Add comment for FormatCodeForOID 2022-03-05 08:56:41 -06:00
Jack Christensen 3ce50c079e Rename dbSavepoint to dbSimulatedNestedTx
https://github.com/jackc/pgx/issues/1161
2022-03-05 08:41:02 -06:00
Jack Christensen b7a85d1a6f Consider any "0A000" error a possible cached plan changed error
https://github.com/jackc/pgx/issues/1162
2022-03-05 08:23:58 -06:00
Andrew Rusakow a86ece025c Fix single line comment for line endings in mac when sanitizing. 2022-03-04 18:17:40 -06:00
Vu a365c9a3c2 Add multirange support for num, int4 and int8 type 2022-03-04 18:15:30 -06:00
Jack Christensen 45a8b00271 Do not recursively call public PlanScan that caches
Otherwise, wrapper types get cached. Wrapper types are expected to fail
most of the time. These failures should not be cached. In addition,
wrappers wrap multiple different types so it doesn't make sense to cache
results of a wrapper.
2022-03-04 11:04:46 -06:00
Jack Christensen a8f6674a07 TextCodec specifically supports scanning to BytesScanner
This lets it support DriverBytes and PreallocatedBytes.
2022-02-26 20:28:15 -06:00
Jack Christensen ffc5a692cb Detect unsafe pgtype.DriverBytes usage
Add test for unsafe usage and test for correct usage that ensures driver
memory is actually used.
2022-02-26 20:23:35 -06:00
Jack Christensen b1e4b96e6c Reduce big read buffer allocations with sync.Pool 2022-02-26 19:57:41 -06:00
Jack Christensen 2fad63c189 Set cap when returning slice from chunkReader 2022-02-26 09:37:14 -06:00
Jack Christensen e641d0a5ad Reuse connection read buffer
To avoid extra copies and small allocations previously large
read buffers were allocated and never reused. However, the down side of
this was greater total memory allocation and the possibility that a
reference to a single byte could pin an entire buffer.

Now the buffer is reused.
2022-02-26 09:31:45 -06:00
Jack Christensen 2e0ec225de Make Chunkreader an internal implementation detail 2022-02-26 08:50:46 -06:00
Jack Christensen d13f651810 Finish importing pgio as internal package 2022-02-21 14:35:20 -06:00
Jack Christensen 1be4c10ce4 Merge branch 'pgioimport' into v5-dev 2022-02-21 14:33:10 -06:00
Jack Christensen d35500e397 Move pgio 2022-02-21 14:32:55 -06:00
Jack Christensen 032ea5f5c0 Finish import of chunkreader 2022-02-21 14:29:39 -06:00
Jack Christensen 44375443e1 Merge branch 'chunkreaderimport' into v5-dev 2022-02-21 14:27:21 -06:00
Jack Christensen fd1a98f858 Move and clean for import 2022-02-21 14:27:05 -06:00
Jack Christensen 95cbbfe441 Import pgproto3
Also copy in pgmock as an internal package.
2022-02-21 13:22:42 -06:00
Jack Christensen e06cc67875 Merge branch 'pgproto3import' into v5-dev 2022-02-21 11:58:13 -06:00
Jack Christensen 04476c4a13 Move pgproto3 to subdirectory 2022-02-21 11:57:34 -06:00
Jack Christensen 43083cb0e3 Memoize pgtype.Map.PlanScan 2022-02-21 10:10:16 -06:00
Jack Christensen 9c538cd4a9 Remove actualTarget argument 2022-02-21 09:30:01 -06:00
Jack Christensen f3defbc150 Rename pgtype.None to pgtype.Finite 2022-02-21 09:25:30 -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