Commit Graph

12 Commits (507a9e9ad362633bb3544d9c75ba73cc6a89a52b)

Author SHA1 Message Date
Dan McGee 507a9e9ad3 Remove some now unused pgtype code
Most of this is in conversion, and I assume it became unused with some
of the v5 changes and refactors to a codec-based approach.

There are likely a few more cleanups to be made, but these ones seemed
easy and safe to start with.
2023-07-10 20:23:42 -05:00
Evan Jones e5db6a0467 pgtype array: Fix encoding of vtab \v
Arrays with values that start or end with vtab ("\v") must be quoted.
Postgres's array parser skips leading and trailing whitespace with
the array_isspace() function, which is slightly different from the
scanner_isspace() function that was previously linked. Add a test
that reproduces this failure, and fix the definition of isSpace.

This also includes a change to use strings.EqualFold which should
really not matter, but does not require copying the string.
2023-06-17 17:15:58 -05:00
Jack Christensen 0c6266ef30 Fix scanning null did not overwrite slice 2022-04-26 14:52:01 -05:00
Jack Christensen cc7de81d3b Make array helpers private 2022-04-16 14:21:40 -05:00
Jack Christensen f1a4ae3070 Add Array and FlatArray container types 2022-04-16 11:33:45 -05:00
Jack Christensen d13f651810 Finish importing pgio as internal package 2022-02-21 14:35:20 -06:00
Jack Christensen 1f2f239d09 Renamed pgtype.ConnInfo to pgtype.Map 2022-02-21 09:13:09 -06:00
Jack Christensen 1334d45d71 Parse array header to empty slices instead of nils 2022-02-08 11:35:40 -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 58b7486343 Initial codec support for int2 and int2[] 2021-12-23 13:12:54 -06:00
Jack Christensen 44214b7854 Import to pgx main repo in pgtype subdir 2021-12-04 13:07:54 -06:00