Jack Christensen
1ef2cee36e
Update changelog
2022-04-09 10:26:45 -05:00
Jack Christensen
976b1e03a9
Use generics for RangeCodec
...
This allows DecodeValue to return a more strongly typed value.
2022-04-09 10:21:17 -05:00
Jack Christensen
c8025fd79a
Use generics for Range values
2022-04-09 09:34:37 -05:00
Jack Christensen
f14fb3d692
Replace interface{} with any
2022-04-09 09:12:55 -05:00
Jack Christensen
95265a7421
Use Go 1.18
2022-04-09 09:11:19 -05:00
Jack Christensen
829babcea9
Better number to string handling
...
Avoid ambiguity of stringWrapper implementing Int64Scanner and
Float64Scanner.
2022-04-09 09:09:46 -05:00
Jack Christensen
8cf6721d66
Better int64 / numeric compat and text fixes
v5.0.0-alpha.2
2022-04-02 16:55:05 -05:00
Jack Christensen
53ec52aa17
Fix out of date pgtype/int_test.go.erb
2022-04-02 14:41:33 -05:00
Jack Christensen
ee93440ac1
pgtype uses pgxtest
...
Added ValueRoundTripTest to pgxtest
Removed pgtype/testutil
pgtype tests now run with all (applicable) query modes. This gives
better coverage than before and revealed several bugs which are also
fixed in this commit.
2022-04-02 14:34:19 -05:00
Jack Christensen
83e50f21e8
Extract SkipCockroachDB to pgxtest
2022-04-02 10:35:13 -05:00
Jack Christensen
e18d76b798
Initial extraction of pgxtest
...
- Introduce ConnTestRunner
- RunWithQueryExecModes
2022-04-02 10:26:47 -05:00
Jack Christensen
e392908c72
Remove Int64Valuer implementation from stringWrapper
2022-04-02 08:24:55 -05:00
Jack Christensen
500c0721d7
Improve error messages for query argument encoding
2022-04-01 18:00:25 -05:00
Jack Christensen
3a6d9490e5
Only test numeric infinity on PG 14+
2022-03-26 11:38:31 -05:00
Jack Christensen
600c4fd931
Skip test for Cockroach CI
2022-03-22 20:44:17 -05:00
Jack Christensen
103dfe145e
Test should always close rows
2022-03-22 20:41:05 -05:00
Jack Christensen
7b31b56de9
Reactivate CI for other DB versions
2022-03-22 20:33:24 -05:00
Jack Christensen
e04b35bfcb
Make pgtype test compat with CockroachDB when possible
2022-03-22 20:33:24 -05:00
Jack Christensen
210ebb4a50
Disable incomptible test with CockroachDB
2022-03-22 20:33:24 -05:00
Jack Christensen
0fd0688d4f
Alter some tests for CockroachDB
2022-03-22 20:33:24 -05:00
Jack Christensen
69580cd519
Fix a test failure
2022-03-22 20:33:24 -05:00
Jack Christensen
95c03dc9ae
Unskip and fix tests
2022-03-22 20:33:24 -05:00
Jack Christensen
793eb53017
Enable test with updated error message
2022-03-22 20:33:24 -05:00
Jack Christensen
29bec2b97e
Remove skipped test for scan binary to string
...
Receiving a binary value and encoding it back into text seems to be an
anti-pattern to may. Don't want to silently enable this. May be able to
reverse course later if necessary.
2022-03-22 20:33:24 -05:00
Jack Christensen
0cd7c757c3
Fix skipped test
2022-03-22 20:33:24 -05:00
Jack Christensen
be5a6cc9c0
Remove obsolete test
2022-03-22 20:33:24 -05:00
Jack Christensen
5ca048ed2d
Fix crash with pointer to nil struct
2022-03-22 20:33:24 -05:00
Patrick Audley
9f23ed84ba
Minor typo in Changelog
2022-03-21 09:01:46 -05:00
Jack Christensen
8c18d7808b
Add documentation
v5.0.0-alpha.1
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