Commit Graph

392 Commits (5db1de5fc18703ddf645024dff9ff73c98bc9107)

Author SHA1 Message Date
WGH 5db1de5fc1 Make text format for type_array.go.erb opt-out
Some types, like RECORD, don't have sane text format. If we want to have
arrays of such types, we don't want to generate text format for such arrays
either.
2022-04-02 18:52:15 -05:00
WGH 71648e3d78 Add defaults for typed_array.go.erb template parameters
Most of the time binary_format is "true", and text_null is "NULL",
so it makes sense to not repeat that.
2022-04-02 18:52:15 -05:00
WGH 5ece2efd4c Fix typo in Record type documentation 2022-04-02 18:52:15 -05:00
Jens Emil Schulz Østergaard 4c6f1b1dc4 fix: add json rawmessage to typed_array_gen.sh 2022-03-21 19:15:21 -05:00
Jens Emil Schulz Østergaard b103a6efbd test: jsonbarray set failing test cases 2022-03-21 19:15:21 -05:00
Vu a365c9a3c2 Add multirange support for num, int4 and int8 type 2022-03-04 18:15:30 -06:00
Jack Christensen 202542ead5 Release v1.10.0 2022-02-07 10:51:03 -06:00
Collin Forsyth f4252a58be correctly Scan type aliases for floating point types 2022-02-05 20:23:39 -06:00
Pinank Solanki 94e10b98b1 Fix typo in float8 2022-02-01 16:55:20 -06:00
Oleg Lomaka ccc7cc2931 Assign Numeric to *big.Rat 2022-01-14 17:16:04 -06:00
Torkel Rogstad 75446032b9 Normalize UTC timestamps to comply with stdlib 2021-12-04 10:22:49 -06:00
Jack Christensen e95ebc02d9 Release v1.9.1 2021-11-28 16:29:42 -06:00
Jack Christensen 84bb47fb26 Fix: Timestamp DecodeBinary is in UTC
Preserve previously existing behavior.

fixes #138
2021-11-24 07:57:51 -06:00
Jack Christensen e80bc75409 Release v1.9.0 2021-11-20 10:09:43 -06:00
Jim Tsao decb75f242 Add numeric tests for infinity encoding/decoding 2021-11-01 07:28:13 -05:00
Jim Tsao 14c515db82 Add infinity support for Numeric Binary Encode/Decode 2021-11-01 07:28:13 -05:00
Jim Tsao 8890a746d7 Add infinity support for Numeric Text Encode/Decode 2021-11-01 07:28:13 -05:00
Jim Tsao 001b3166b9 Add infinity support for Numeric AssignTo 2021-11-01 07:28:13 -05:00
Jim Tsao e0f9fc5212 Add infinity support for Numeric Set/Get 2021-11-01 07:28:13 -05:00
Jack Christensen a29019de9d Fix binary decoding of very large numerics.
fixes #133
2021-10-30 10:17:58 -05:00
Jack Christensen 2caf113f1b Fix parsing text array with negative bounds
e.g. '[-4:-2]={1,2,3}'

fixes #132
2021-10-30 09:00:48 -05:00
Adrian Sieger b72f8084b5 implement nullable values for hstore maps 2021-10-30 08:38:48 -05:00
Jack Christensen 5cb98120c1 Add tests for big time and port fix to Timestamp.DecodeBinary
https://github.com/jackc/pgtype/pull/128
2021-10-23 09:57:10 -05:00
Jim Tsao e28459e9d1 Fix int64 overflow error 2021-10-08 14:46:26 +02:00
Jan Dubsky e53b7aebab Add support for fmt.Stringer and driver.Valuer in String fields encoding 2021-09-25 09:31:55 -05:00
Jack Christensen 0b5b7c0d1e Fix BPChar.AssignTo **rune
https://github.com/jackc/pgtype/issues/123
2021-09-25 09:25:01 -05:00
Jack Christensen 693c7c7f7d Fix NULL being lost when scanning unknown OID into sql.Scanner
https://github.com/jackc/pgx/issues/1078
2021-09-11 10:59:26 -05:00
Jack Christensen 90af821478 Remove old Travis CI code 2021-08-26 21:09:46 -05:00
Jack Christensen 30d7638296 Fix zeronull.Float8 2021-08-26 15:42:47 -05:00
Jack Christensen 39aa071b15 Add zeronull float8 2021-08-26 13:21:02 -05:00
Carl Dunham 94f8441f4e Fix #119: add support for bare IP address as input for Inet 2021-08-12 17:50:31 -05:00
Eli Treuherz db84905b7f Add NullDecimal to shopspring-numeric
The shopspring/decimal package provides a NullDecimal struct intended
for use with nullable SQL NUMERICs and numbers. It has Scanner and
Valuer implementations already, but adding it to this package allows
it to be used with the binary encoding as well.

The implementation is very straightforward, but the tests have been made
slightly more complicated. The previous version wasn't testing the
decimal.Decimal cases, and this change adds those as well as new
NullDecimal cases. I've added some logic to the test harness to catch
these as you need to use the Equals method to properly compare Decimals.
2021-08-07 08:23:02 -05:00
Jack Christensen 6bda09691d Fix hstore binary null decoding
Bug was advancing the read pointer by the length of the value even if it
was a NULL value. Since NULL is indicated by a -1 length it actually
decremented the read pointer.
2021-07-31 11:06:03 -05:00
Jack Christensen e26c6b4e3d Release v1.8.1 2021-07-24 10:50:22 -05:00
Jack Christensen 377eed5d2f Cleaning go.sum 2021-07-24 10:48:07 -05:00
Jack Christensen c16a4f7d6a Revert "Temporarily delete tests and pgxtype to break recursive dependency with pgx"
This reverts commit 32e20a6031.
2021-07-24 10:40:30 -05:00
Jack Christensen 32e20a6031 Temporarily delete tests and pgxtype to break recursive dependency with pgx 2021-07-24 10:16:00 -05:00
Jack Christensen 7d0a620dda Upgrade pgx version used for tests 2021-07-24 09:20:54 -05:00
Jack Christensen dcdc3eaec7 Release v1.8.0 2021-07-10 09:58:12 -05:00
Cameron Daniel 3eceab0f38 Maintain host bits for inet types 2021-07-06 19:59:41 -05:00
Jack Christensen 2ca304d461 pgtype.Inet preserves masked address portion
fixes #111
2021-06-26 10:49:56 -05:00
Sivabalan Thirunavukkarasu 2c22da0155 Bumping versions for other dependencies 2021-06-19 10:06:24 -05:00
Sivabalan Thirunavukkarasu 821e0521e4 Updating dependency versions 2021-06-19 10:06:24 -05:00
Ivan Daunis 5bca076182 Refactor to interface convert 2021-05-22 11:33:42 -05:00
Ivan Daunis 0977e29341 Support pointers of wrapping structs 2021-05-22 11:33:42 -05:00
Rueian cae98b5e45
Register JSONBArray at NewConnInfo() 2021-05-03 22:20:58 +08:00
Jack Christensen 4380e23ae1 CompositeTextScanner handles backslash escapes
fixes https://github.com/jackc/pgx/issues/874
2021-04-24 08:08:34 -05:00
Jack Christensen 4a3a424dff Release v1.7.0 2021-03-25 09:16:43 -04:00
Jack Christensen 63e2dbefaf Update copyright date 2021-03-25 09:08:27 -04:00
Jack Christensen dd160540c4 Use Go 1.13 errors instead of xerrors 2021-03-25 09:08:27 -04:00