2
0
Commit Graph

11 Commits

Author SHA1 Message Date
Jack Christensen 666af9ead5 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 44e206ab5b Rename array files 2017-03-11 16:53:07 -06:00
Jack Christensen 2f63514c47 Move ACLItem to pgtype 2017-03-11 16:13:05 -06:00
Jack Christensen 86620c5e91 Add pgtype.ByteaArray
Also fix up quoting array elements for text arrays.
2017-03-11 13:32:32 -06:00
Jack Christensen e654d1f0fc pgtype.Encode(Binary|Text) do not write length
To aid in composability, these methods no longer write their own length. This
is especially useful for text formatted arrays and may be useful for future
database/sql compatibility. It also makes the code a little simpler as the
types no longer have to compute their own size.

Along with this, these methods cannot encode NULL. They now return a boolean
if they are NULL. This also benefits text array encoding as numeric arrays
require NULL to be exactly `NULL` while string arrays require NULL to be
`"NULL"`.
2017-03-11 12:45:30 -06:00
Jack Christensen bb7122d4a8 Fix typed_array_gen.sh typo 2017-03-09 21:09:36 -06:00
Jack Christensen 4254e5f2d2 Add text to pgtype 2017-03-04 21:20:56 -06:00
Jack Christensen 93e1715082 Add inet and cidr to pgtype 2017-03-04 17:33:41 -06:00
Jack Christensen 0f115477de Add float4, float8 and arrays 2017-03-04 13:29:04 -06:00
Jack Christensen 39b60605ae Add timestamp to pgtype 2017-03-04 12:36:24 -06:00
Jack Christensen 34c5070371 Add arrays to all other pgtypes 2017-03-04 11:48:53 -06:00