Commit Graph

15 Commits (94e10b98b1558e160816e82090e68dd9a7e8b66c)

Author SHA1 Message Date
Jack Christensen dd160540c4 Use Go 1.13 errors instead of xerrors 2021-03-25 09:08:27 -04:00
duohedron 2bc8c67e4a Fix misleading names parseString and parseFloat64 in polygon.go 2020-10-08 07:59:44 -05:00
duohedron b55f972f49 Add comment to Polygon.Set() 2020-10-08 07:59:44 -05:00
duohedron 6166c99b77 Add Undefined status to invalid Polygon 2020-10-08 07:59:44 -05:00
duohedron 2dca42ee7d Add Set(string|[]Vec2|[]float64) to Polygon 2020-10-08 07:59:44 -05:00
Jack Christensen f3816bd1c0 Get implemented on T instead of *T
Methods defined on T are also available on *T. Thought this technically
changes the interface, because *T will be automatically dereferenced as
needed it shouldn't be a breaking change.

See a8802b16cc for similar change.
2020-02-19 10:48:09 -06:00
Jack Christensen a8802b16cc Value, EncodeBinary, EncodeText, and MarshalJSON on T instead of *T
Methods defined on T are also available on *T. This change makes Value
consistent with database/sql Value implementations. It also makes Value,
EncodeBinary, and EncodeText more convenient to use because you can
pass T or *T as an argument to a query.

The MarshalJSON change is even more significant because without it
json.Marshal would generate the "%v" format instead of the implemented
MarshalJSON.

Thought this technically changes the interface, because *T will be
automatically dereferenced as needed it shouldn't be a breaking change.

See: https://github.com/jackc/pgx/issues/538 for initial discussion.
2019-08-27 20:46:16 -05:00
Jack Christensen f25878662d Use golang.org/x/xerrors 2019-04-20 17:43:44 -05:00
Jack Christensen 0ac82007fb Use extracted packages with Go modules 2019-04-05 10:59:47 -05:00
Jack Christensen 46d0f7e1c8 Fix precision loss for test format geometric types
fixes #399
2018-03-17 10:26:03 -05:00
Jack Christensen a5f166bd21 Use github.com/pkg/errors 2017-06-04 21:30:03 -05:00
Jack Christensen 6b906ca870 Refactor pgio and types to append buffers 2017-05-02 20:38:26 -05:00
Jack Christensen ab21bc4ec7 pgtype DecodeText and DecodeBinary do not copy
They now take ownership of the src argument.

Needed to change Scan to make a copy of []byte arguments as lib/pq apparently
gives Scan a shared memory buffer.
2017-04-29 12:23:51 -05:00
Jack Christensen f0e9337d8f Add satori-uuid type
Make pgtype.EncodeValueText public
2017-04-14 16:46:39 -05:00
Jack Christensen 6a0b41e50a Add pgtype.Polygon 2017-04-04 20:30:04 -05:00