Commit Graph

491 Commits (63422c7d6cfe092af402f48e16729acd1e3bae1c)

Author SHA1 Message Date
Jack Christensen a581124dea Encode with driver.Valuer after trying TryWrapEncodePlanFuncs
However, all builtin TryWrapEncodePlanFuncs check for driver.Valuer and
skip themselves if it is found.
2022-10-12 19:52:57 -05:00
Jack Christensen c4407fb36e Prevent infinite loop for driver.Valuer / Codec edge case
A `driver.Valuer()` results in a `string` that the `Codec` for the
PostgreSQL type doesn't know how to handle. That string is scanned into
whatever the default type for that `Codec` is. That new value is
encoded. If the new value is the same type as the original type than an
infinite loop occured. Check that the types are different.

https://github.com/jackc/pgx/issues/1331
2022-10-12 19:46:15 -05:00
Jack Christensen af0b896290 Allow scanning null even if PG and Go types are incompatible
refs https://github.com/jackc/pgx/issues/1326
2022-10-08 09:10:43 -05:00
Jack Christensen 5655f9d593 Fix scan to pointer to pointer to renamed type
refs https://github.com/jackc/pgx/issues/1326
2022-10-08 08:10:40 -05:00
Jack Christensen 222e3b37bc Prefer driver.Value over wrap plans when encoding
This is tricky due to driver.Valuer returning any. For example, we can
plan for fmt.Stringer because it always returns a string.

Because of this driver.Valuer was always handled as the last option. But
with pgx v5 now having the ability to find underlying types like a
string and supporting fmt.Stringer it meant that driver.Valuer was
often not getting called because something else was found first.

This change tries driver.Valuer immediately after the initial PlanScan
for the Codec. So a type that directly implements a pgx interface should
be used, but driver.Valuer will be prefered before all the attempts to
handle renamed types, pointer deferencing, etc.

fixes https://github.com/jackc/pgx/issues/1319
fixes https://github.com/jackc/pgx/issues/1311
2022-10-01 12:20:23 -05:00
Jack Christensen 89f69aaea9 Date text encoding includes leading zero for month and day
e.g. 2000-01-01 instead of 2000-1-1. PostgreSQL accepted it without
zeroes but our text decoder didn't. This caused a problem when we needed
to take a value and encode to text so something else could parse it as
if it had come from the PostgreSQL server in text format. e.g.
database/sql compatibility.
2022-10-01 10:41:40 -05:00
Jack Christensen 335c8621ff Fix sqlScannerWrapper NULL handling
https://github.com/jackc/pgx/issues/1312
2022-09-24 10:30:12 -05:00
Jack Christensen ac9d4f4d96 Encode text for Lseg includes [ and ]
https://github.com/jackc/pgtype/issues/187
2022-09-24 10:30:12 -05:00
yogipristiawan 72e4b88e56 feat: add marshalJSON for float8 type 2022-09-24 10:00:40 -05:00
Jack Christensen f8d088cfb6 Fix JSON scan not completely overwriting destination
See https://github.com/jackc/pgtype/pull/185 for original report in
pgx v4 / pgtype.
2022-09-02 18:37:02 -05:00
Jack Christensen fe3a4f3150 Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
Jack Christensen 2e73d1e8ee Improve error message when failing to scan a NULL::json 2022-08-22 20:56:36 -05:00
Jack Christensen 0d5d8e0137 Fallback to other format when encoding query arguments
The preferred format may not be possible for certain arguments. For
example, the preferred format for numeric is binary. But if
shopspring/decimal is being used without jackc/pgx-shopspring-decimal
then it will use the database/sql/driver.Valuer interface. This will
return a string. That string should be sent in the text format.

A similar case occurs when encoding a []string into a non-text
PostgreSQL array such as uuid[].
2022-08-22 20:26:38 -05:00
Jack Christensen 02d9a5acd8 Fix naming of some tests 2022-08-13 08:41:06 -05:00
Jack Christensen 8256ab147f Add build tag to skip default PG type registration
https://github.com/jackc/pgx/issues/1273#issuecomment-1207338136
2022-08-13 08:09:44 -05:00
Jack Christensen c3258b7f52 Fix scan pointer to pointer to nil slice
https://github.com/jackc/pgx/issues/1263
2022-07-30 09:10:50 -05:00
Jack Christensen 2da0a11c52 Skip some examples on CockroachDB 2022-07-23 10:52:35 -05:00
Jack Christensen ce378b4d9c Skip example on Cockroach DB 2022-07-23 10:21:01 -05:00
Jack Christensen 5cee04a026 Add child records docs and examples 2022-07-23 10:11:13 -05:00
Jack Christensen 3595561d9a More doc improvements 2022-07-23 09:29:25 -05:00
Jack Christensen 759e47dba3 Merge branch 'master' into v5-dev 2022-07-12 07:26:00 -05:00
Jack Christensen d5807f01ed Restore test from v4 2022-07-12 06:57:56 -05:00
Jack Christensen 224393188d Fix InetCodec.DecodeValue 2022-07-11 08:07:23 -05:00
Jack Christensen e7eb8a3250 Use netip package for representing inet and cidr types 2022-07-10 14:31:55 -05:00
Jack Christensen 7974a102fc Improve Scan error messages 2022-07-09 21:47:39 -05:00
Jack Christensen b662ab6767 Better encode error message 2022-07-09 21:40:44 -05:00
Jack Christensen 90c2dc6f68 Rename ForEachScannedRow to ForEachRow 2022-07-09 16:47:28 -05:00
Jack Christensen 76946fb5a3 Replace QueryFunc with ForEachScannedRow 2022-07-07 20:29:04 -05:00
Jack Christensen 82ca09e645 Numeric infinity only supported on PG 14+
Move to PG 14+ specific test
2022-06-25 13:33:09 -05:00
Jack Christensen c0a4d1b9ce Add a few tests 2022-06-20 20:43:56 -05:00
Jack Christensen 989a4835de Remove rune to text conversion
Because rune is an alias for int32 this caused some very surprising
results. e.g. inserting int32(65) into text would insert "A" instead of
"65".
2022-05-12 17:13:49 -05:00
Jack Christensen 01190e5d78 Update ScanPlan.Scan documentation 2022-04-30 08:29:51 -05:00
Jack Christensen 0c6266ef30 Fix scanning null did not overwrite slice 2022-04-26 14:52:01 -05:00
Jack Christensen 7427820aba Scan binary UUID to string
https://github.com/jackc/pgx/issues/1191
2022-04-26 08:37:10 -05:00
Jack Christensen f9857b73d9 Skip multirange tests on PG < 14 2022-04-23 16:55:24 -05:00
Jack Christensen dfb681d716 Build / rewrite / port multirange support 2022-04-23 12:50:18 -05:00
Jack Christensen 126b582f19 Make range helpers private 2022-04-23 11:10:04 -05:00
Jack Christensen cb45e85954 Merge remote-tracking branch 'pgtype/master' into v5-dev 2022-04-23 11:00:07 -05:00
Jack Christensen 468b793282 Skip tests with unsupported types on CockroachDB 2022-04-23 10:34:53 -05:00
Jack Christensen cc7de81d3b Make array helpers private 2022-04-16 14:21:40 -05:00
Jack Christensen a01a9ee6df Automatically register Array and FlatArray 2022-04-16 14:04:25 -05:00
Jack Christensen fccaebc93d Add pgtype.Map.SQLScanner
This enables compatibility with database/sql for types that cannot
implement Scan themselves.
2022-04-16 13:38:27 -05:00
Jack Christensen f1a4ae3070 Add Array and FlatArray container types 2022-04-16 11:33:45 -05:00
Jack Christensen d4abe83edb Revert use generics for RangeCodec
Reverted almost all of 976b1e0.

Still may consider a way to get DecodeValue to be strongly typed but
that feature isn't worth the complications of generics. Especially in
that applying this style to ArrayCodec would make Conn.LoadType
impossible for arrays.
2022-04-16 10:39:12 -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 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 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 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 e04b35bfcb Make pgtype test compat with CockroachDB when possible 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
Jack Christensen 8c18d7808b Add documentation 2022-03-19 17:01:12 -05:00
Jack Christensen 0c166c7620 Fix BC dates in text format 2022-03-12 12:47:01 -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 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 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 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 d13f651810 Finish importing pgio as internal package 2022-02-21 14:35:20 -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
Jack Christensen f861d83a17 Fix range types not clearing unbounded or empty 2022-02-08 16:48:17 -06:00
Jack Christensen 0306ce3a19 Fix scanning negative ints into Int64Scanner 2022-02-08 14:13:06 -06:00
Jack Christensen 1334d45d71 Parse array header to empty slices instead of nils 2022-02-08 11:35:40 -06:00
Jack Christensen bcc0af3f56 Fix scan empty array into multi-dimension slice 2022-02-08 11:12:05 -06:00
Jack Christensen 7193e48923 Restore multi-dimensional slices
Move ArrayCode to use pgtype wrapper pattern as well
2022-02-08 10:07:40 -06:00
Jack Christensen 02372f1c3c Add DecodeValue to composites 2022-02-05 15:12:09 -06:00
Jack Christensen 3a94113118 Add composite to arbitrary struct encoding and decoding 2022-02-05 14:24:34 -06:00
Jack Christensen 727fc19cb7 Another error message improvement 2022-02-05 13:10:58 -06:00
Jack Christensen 28ea2cd190 Better error messages 2022-02-05 13:05:23 -06:00
Jack Christensen 6ebf54b62b Fix EnumCodec caching and add tests 2022-02-05 09:57:40 -06:00
Jack Christensen 288080c58c Add test documenting typed nil json encoding
Encoded into json null not SQL NULL.
2022-02-05 09:34:39 -06:00
Jack Christensen 0355d2ffea Add Float8range
PostgreSQL doesn't define float8range out of the box though it can
easily be created by the user. However, it is still convenient to treat
a numrange as a float8range.
2022-02-05 08:54:38 -06:00
Jack Christensen a74ebc9e51 pgtype.Numeric implements Float64Valuer 2022-02-05 08:39:53 -06:00
Jack Christensen a280f4db8a Float4 and Float8 implement Int64 Scanner and Valuer 2022-02-03 20:19:52 -06:00
Jack Christensen ba4583cf4c Add range array types 2022-02-02 08:47:56 -06:00
Jack Christensen cebe44ee85 Restore range support 2022-02-02 08:40:42 -06:00
Jack Christensen 11223497b3 Restore record support 2022-01-31 20:42:12 -06:00
Jack Christensen ef7114a8ce Add DecodeValue and DecodeDatabaseSQLValue for ArrayCodec 2022-01-31 20:39:50 -06:00
Jack Christensen 558748ef9c ArrayCodec contains element DataType 2022-01-29 16:41:07 -06:00
Jack Christensen b5bf9d7bb9 Move LoadDataType to pgx.Conn 2022-01-29 16:32:05 -06:00
Jack Christensen f5c3eeb813 Initial rebuilt composite support 2022-01-29 15:43:18 -06:00
Jack Christensen dc77e7c2da Add QueryRow warning to DriverBytes 2022-01-29 08:17:50 -06:00
Jack Christensen 47345e0d1e ArrayHeader.EncodeBinary doesn't need ci parameter 2022-01-25 20:21:28 -06:00
Jack Christensen 551d26ca41 Change ArrayHeader.ElementOID to uint32 2022-01-25 20:19:02 -06:00
Jack Christensen 0ddf9e3b4b Try wrapping scan target before sql.Scanner
This allows wrappers to directly avoid the slow sql.Scanner interface.
2022-01-22 18:40:46 -06:00
Jack Christensen 5ed95dcd1c Expose wrap functions on ConnInfo
- Remove rarely used ScanPlan.Scan arguments
- Plus other refactorings and fixes that fell out of this change.
- Plus rows Scan now handles checking for changed type.
2022-01-22 17:50:19 -06:00
Jack Christensen 322bfedc60 Remove old SQL scanner integration 2022-01-22 16:20:37 -06:00
Jack Christensen aedf7d63e5 Expose try wrap functions in ConnInfo 2022-01-22 16:19:32 -06:00
Jack Christensen 2b395f3730 pgtype.DataType.Codec can never be nil 2022-01-22 12:21:16 -06:00
Jack Christensen db95cee40c Remove pgtype.Value interface 2022-01-22 12:18:40 -06:00
Jack Christensen 4cf6dc9447 Remove BinaryEncoder and TextEncoder 2022-01-22 12:16:02 -06:00
Jack Christensen 3a90c6c879 Removed TextEncoder and BinaryEncoder
Restructured / fixed a lot of tests along the way.
2022-01-22 12:07:35 -06:00
Jack Christensen eb0a4c9626 Replace some old database/sql compatibility 2022-01-22 11:21:12 -06:00
Jack Christensen ad785d8134 Remove TypeValue interface 2022-01-22 10:56:56 -06:00
Jack Christensen 8d2c87b5e5 Remove old typed array code gen 2022-01-22 10:54:54 -06:00
Jack Christensen 740263c0d4 Convert UUID to Codec 2022-01-22 10:53:47 -06:00
Jack Christensen b9b5e35d0f Convert numeric to Codec 2022-01-22 09:31:59 -06:00
Jack Christensen 0056156904 Add time array 2022-01-21 16:51:53 -06:00
Jack Christensen 61b4fb7689 Convert time to Codec 2022-01-21 16:50:30 -06:00
Jack Christensen c8b8764401 Allow scanning tid to string 2022-01-20 20:59:36 -06:00
Jack Christensen 5ca29a014e Add tid array 2022-01-20 20:41:56 -06:00
Jack Christensen 7a3bc454e0 Convert TID to Codec 2022-01-20 20:40:37 -06:00
Jack Christensen b10eb89fe4 Use wrapper to treat fmt.String as pgtype.TextValuer 2022-01-20 20:22:53 -06:00
Jack Christensen 06f4e47750 Add macaddr array 2022-01-20 20:10:43 -06:00
Jack Christensen 97443487ce Convert macaddr to Codec 2022-01-20 20:07:09 -06:00
Jack Christensen b2e5c4ff6e Add "char" array 2022-01-20 18:00:43 -06:00
Jack Christensen bcf4931a7e Convert "char" to Codec 2022-01-20 17:58:57 -06:00
Jack Christensen 99fb8cf2f3 Convert timestamp and timestamptz to Codec 2022-01-18 21:49:38 -06:00
Jack Christensen 8b27725f5b Convert json and jsonb to Codec 2022-01-18 16:04:25 -06:00
Jack Christensen 8728acfca6 Add polygon array 2022-01-18 12:05:28 -06:00
Jack Christensen abd7e98f31 Convert polygon to Codec 2022-01-18 12:04:17 -06:00
Jack Christensen 11d96fb928 Add path array 2022-01-18 11:52:44 -06:00
Jack Christensen 5ff0ad548b Convert path to Codec 2022-01-18 11:51:08 -06:00
Jack Christensen 0ae8de35c8 Add lseg array 2022-01-18 11:39:58 -06:00
Jack Christensen 869213a315 Convert lseg to Codec 2022-01-18 11:38:35 -06:00
Jack Christensen 97d8a408ea Add line array 2022-01-18 11:30:39 -06:00
Jack Christensen 06593ffb10 Convert line to Codec 2022-01-18 11:29:19 -06:00
Jack Christensen bff036b366 Add interval array support 2022-01-15 18:48:10 -06:00
Jack Christensen 77e4b01553 Convert Interval to Codec 2022-01-15 18:46:28 -06:00
Jack Christensen 5472ce9f10 Reorder Box functions 2022-01-15 18:45:42 -06:00
Jack Christensen 67720623f8 Extract plan wrapper concept 2022-01-15 18:43:52 -06:00
Jack Christensen a6863a7dd2 Convert Hstore to Codec 2022-01-15 17:47:37 -06:00
Jack Christensen 313254c75d Convert float4 and float8 to Codec 2022-01-15 11:12:06 -06:00
Jack Christensen 05598d4ca6 Convert inet and cidr to codec 2022-01-15 09:48:21 -06:00
Jack Christensen f743007fb4 Restore array support to pgxtype.LoadDataType 2022-01-11 20:49:20 -06:00
Jack Christensen ae9be0b99e Replace EnumType with EnumCodec 2022-01-11 20:46:10 -06:00
Jack Christensen b57e0c419b Convert Date to Codec 2022-01-10 21:02:20 -06:00
Jack Christensen f4a9d84e32 Add CID, OID, and XID arrays 2022-01-09 00:41:25 -06:00
Jack Christensen eec82c9433 Replace CID, OID, OIDValue, and XID with Uint32 2022-01-09 00:35:49 -06:00
Jack Christensen b26618ac95 Prevent try underlying type from acting on a value
This is necessary to prevent infinite recursion where a base type is
wrapped and then unwrapped.
2022-01-09 00:25:20 -06:00
Jack Christensen ad79dccd99 Builtin types are automatically wrapped if necessary 2022-01-08 23:44:53 -06:00
Jack Christensen 8aaf235595 Standardize scanner and valuer for int types 2022-01-08 21:41:08 -06:00
Jack Christensen dc05bd9fee Remove old code gen 2022-01-08 20:51:44 -06:00
Jack Christensen 6be0c3f6b2 Remove convertToBoolForEncode 2022-01-08 20:51:28 -06:00
Jack Christensen 6cb3439492 Fix encode plan names 2022-01-08 18:35:54 -06:00
Jack Christensen f573cde09c Convert bytea to Codec 2022-01-08 18:33:08 -06:00
Jack Christensen c6f3e03a61 BoolCodec EncodePlan actually plans 2022-01-08 17:01:32 -06:00
Jack Christensen f5347987a6 Add bit and varbit array support 2022-01-08 16:53:15 -06:00
Jack Christensen 17513d175a Convert bit and varbit to Codec 2022-01-08 16:49:58 -06:00
Jack Christensen 1eee7987e1 Use TextCodec for aclitem type 2022-01-08 16:24:05 -06:00
Jack Christensen 313569db56 Remove useless allocations 2022-01-08 13:38:56 -06:00
Jack Christensen 4aff33603d Remove useless receivers 2022-01-08 13:37:23 -06:00
Jack Christensen 6a6878bafd Fix Box, Circle, and Point NULL 2022-01-08 13:29:47 -06:00
Jack Christensen 58d2d8e453 Add name array 2022-01-08 13:16:09 -06:00
Jack Christensen fcc9dcc960 Convert text to Codec
This also entailed updating and deleting types that depended on Text.
2022-01-08 13:13:26 -06:00
Jack Christensen a7d4a22001 Add point array support 2022-01-08 09:37:40 -06:00
Jack Christensen 2b0afbb408 Convert point to Codec 2022-01-08 09:33:08 -06:00
Jack Christensen dcaf102f8e Introduce PlanEncode 2022-01-05 08:59:21 -06:00
Jack Christensen ac80fa5b33 Remove proposed v5 type system before Codec 2022-01-04 20:04:48 -06:00
Jack Christensen 1a189db041 Remove ValueTranscoder interface 2022-01-04 19:59:32 -06:00
Jack Christensen b90f92d2d2 Remove obsolute ArrayType 2022-01-04 19:58:40 -06:00
Jack Christensen 80ae29d056 Inline Encoder interface to Codec 2022-01-04 19:56:16 -06:00
Jack Christensen 6a32f938f1 Extract codecDecodeToTextFormat 2022-01-03 21:23:29 -06:00
Jack Christensen f7c0c31e87 Extract DecodeValue helper 2022-01-03 21:20:52 -06:00
Jack Christensen ad6ee2bd56 Add circle array 2022-01-03 20:56:12 -06:00
Jack Christensen eb2c37a983 Convert circle to Codec 2022-01-03 20:53:50 -06:00
Jack Christensen 5c4560eed3 Add box array 2022-01-03 20:30:57 -06:00
Jack Christensen 298a5f0dca Convert box to Codec 2022-01-03 20:27:44 -06:00
Jack Christensen 4b1121c2a9 Convert bool to Codec 2022-01-01 18:18:47 -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 40fb889605 Temporarily remove composite and record support 2022-01-01 11:41:08 -06:00
Jack Christensen ffa1fdd66e Temporarily remove range type support 2022-01-01 11:32:52 -06:00
Jack Christensen d2cf33ed40 Add UnmarshalJSON to generated ints 2022-01-01 11:25:26 -06:00
Jack Christensen 0403c34ae3 Prepare for generating tests 2022-01-01 11:22:14 -06:00
Jack Christensen 1b353297d5 Prepare for generating int types 2022-01-01 11:11:31 -06:00
Jack Christensen 6c7f1593e8 Use rake to build generated code 2022-01-01 10:54:54 -06:00
Jack Christensen 93cc21199f All tests passing 2021-12-31 17:54:47 -06:00
Jack Christensen 1516a0d8db pgtype tests pass 2021-12-31 17:51:18 -06:00
Jack Christensen 19ae359e9e Add binary scan plans for int2 2021-12-31 17:03:31 -06:00
Jack Christensen 77b9b59622 Generate text to int scan plans 2021-12-31 13:07:08 -06:00
Jack Christensen b99d95470f Fix tryBaseTypeScanPlan infinite recursion 2021-12-31 12:32:46 -06:00
Jack Christensen c39924d0c6 Improvements to ArrayCodec 2021-12-31 12:28:45 -06:00
Jack Christensen 9fc8f9b3a8 Initial passing tests for main pgx package 2021-12-30 18:12:47 -06:00
Jack Christensen 58b7486343 Initial codec support for int2 and int2[] 2021-12-23 13:12:54 -06:00
Jack Christensen 85b08ac663 Fix some previously broken comment links 2021-12-11 13:30:36 -06:00
Jack Christensen 72cc95e4dd Bump module version to v5 2021-12-11 13:29:03 -06:00
Jack Christensen 390bd79757 Add array integration benchmarks 2021-12-11 09:19:11 -06:00
Jack Christensen d9e53647ec Use ideomatic casing 2021-12-11 09:08:05 -06:00
Jack Christensen 0e293b966c Finish import of pgconn 2021-12-04 14:06:57 -06:00