Commit Graph

9 Commits (6f1c5cc3e64f3dd7ca0ab61cf1033c13881b808f)

Author SHA1 Message Date
Jack Christensen 8f4178b3d3 Use github.com/pkg/errors 2017-06-04 21:30:03 -05:00
Jack Christensen 6688466123 Use Go casing convention for JSON(B) 2017-06-03 11:57:14 -05:00
Jack Christensen 6e64a0c867 Refactor pgio and types to append buffers 2017-05-02 20:38:26 -05:00
Jack Christensen 932caef600 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 a8c350c77d 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 bec9bd261b Add database/sql support to pgtype 2017-03-18 21:11:43 -05:00
Jack Christensen 19c6689752 Add pgtype.Record and prerequisite restructuring
Because reading a record type requires the decoder to be able to look up oid
to type mapping and types such as hstore have types that are not fixed between
different PostgreSQL servers it was necessary to restructure the pgtype system
so all encoders and decodes take a *ConnInfo that includes oid/name/type
information.
2017-03-18 12:01:16 -05:00
Jack Christensen 57494a6a0f Expand pgtype.Value interface
- Include and rename ConvertFrom to Set
- Add Get
- Include AssignTo
2017-03-11 19:53:45 -06:00
Jack Christensen 542eac08c6 Add json/jsonb to pgtype 2017-03-11 18:46:51 -06:00