2
0
Commit Graph

7 Commits

Author SHA1 Message Date
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