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.
This commit is contained in:
@@ -20,10 +20,10 @@ func (src *GenericBinary) AssignTo(dst interface{}) error {
|
||||
return (*Bytea)(src).AssignTo(dst)
|
||||
}
|
||||
|
||||
func (dst *GenericBinary) DecodeBinary(src []byte) error {
|
||||
return (*Bytea)(dst).DecodeBinary(src)
|
||||
func (dst *GenericBinary) DecodeBinary(ci *ConnInfo, src []byte) error {
|
||||
return (*Bytea)(dst).DecodeBinary(ci, src)
|
||||
}
|
||||
|
||||
func (src GenericBinary) EncodeBinary(w io.Writer) (bool, error) {
|
||||
return (Bytea)(src).EncodeBinary(w)
|
||||
func (src GenericBinary) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
|
||||
return (Bytea)(src).EncodeBinary(ci, w)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user