Commit Graph

7 Commits (4d9c44fc014bcd2e4d0efca99a9b355036c84899)

Author SHA1 Message Date
Jack Christensen 4d9c44fc01 Factor out duplication in AssignTo 2017-03-18 16:54:08 -05:00
Jack Christensen cf70e6b9f4 Add pgtype.HstoreArray
This required restructuring array types to lookup oid of element instead of
hard-coding it due to hstore having a variable oid.
2017-03-18 12:40:54 -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 aac8fd66f2 Remove Set self support from pgtype
Set having the capability to assign an object of the same type was
inconsistently implemented. Some places it was not implemented at all, some
places it was a shallow copy, some places a deep copy. Given that it doesn't
seem likely to ever be used, and if it is needed it is easy enough to do
outside of the library this code has been removed.
2017-03-11 20:18:56 -06: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 743b98b298 Name PG types as words
Though this doesn't follow Go naming conventions exactly it makes names more
consistent with PostgreSQL and it is easier to read. For example, TIDOID becomes
TidOid. In addition this is one less breaking change in the move to V3.
2017-03-11 17:03:23 -06:00
Jack Christensen 3dc509df94 Rename array files 2017-03-11 16:53:07 -06:00