2
0
Files
pgx/pgtype/generic_text.go
T
Jack Christensen a8c350c77d Use pointer methods for all struct pgtypes
Now no need to no whether certain interfaces are implemented by struct or
pointer to struct.
2017-04-14 13:08:05 -05:00

41 lines
956 B
Go

package pgtype
import (
"database/sql/driver"
"io"
)
// GenericText is a placeholder for text format values that no other type exists
// to handle.
type GenericText Text
func (dst *GenericText) Set(src interface{}) error {
return (*Text)(dst).Set(src)
}
func (dst *GenericText) Get() interface{} {
return (*Text)(dst).Get()
}
func (src *GenericText) AssignTo(dst interface{}) error {
return (*Text)(src).AssignTo(dst)
}
func (dst *GenericText) DecodeText(ci *ConnInfo, src []byte) error {
return (*Text)(dst).DecodeText(ci, src)
}
func (src *GenericText) EncodeText(ci *ConnInfo, w io.Writer) (bool, error) {
return (*Text)(src).EncodeText(ci, w)
}
// Scan implements the database/sql Scanner interface.
func (dst *GenericText) Scan(src interface{}) error {
return (*Text)(dst).Scan(src)
}
// Value implements the database/sql/driver Valuer interface.
func (src *GenericText) Value() (driver.Value, error) {
return (*Text)(src).Value()
}