pgx/cidr.go
Jack Christensen 6e21cb00fe 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

36 lines
726 B
Go

package pgtype
import (
"io"
)
type Cidr Inet
func (dst *Cidr) Set(src interface{}) error {
return (*Inet)(dst).Set(src)
}
func (dst *Cidr) Get() interface{} {
return (*Inet)(dst).Get()
}
func (src *Cidr) AssignTo(dst interface{}) error {
return (*Inet)(src).AssignTo(dst)
}
func (dst *Cidr) DecodeText(ci *ConnInfo, src []byte) error {
return (*Inet)(dst).DecodeText(ci, src)
}
func (dst *Cidr) DecodeBinary(ci *ConnInfo, src []byte) error {
return (*Inet)(dst).DecodeBinary(ci, src)
}
func (src Cidr) EncodeText(ci *ConnInfo, w io.Writer) (bool, error) {
return (Inet)(src).EncodeText(ci, w)
}
func (src Cidr) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
return (Inet)(src).EncodeBinary(ci, w)
}