Commit Graph

11 Commits (5db1de5fc18703ddf645024dff9ff73c98bc9107)

Author SHA1 Message Date
Jack Christensen dd160540c4 Use Go 1.13 errors instead of xerrors 2021-03-25 09:08:27 -04:00
Jack Christensen 8117205a75 Range types Set method supports its own type, string, and nil
Previously Set would always return an error when called on a range type.
Now it will accept an instance of itself, a pointer to an instance of
itself, a string, or nil. Strings are parsed with the same logic as
DecodeText.
2020-03-03 15:25:57 -06: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 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 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 d94f8daeb1 Use pointer methods for all struct pgtypes
Now no need to no whether certain interfaces are implemented by struct or
pointer to struct.
2017-04-14 13:08:05 -05:00
Jack Christensen 94971db9e2 Add daterange, tsrange, and tstzrange 2017-03-24 14:17:49 -05:00