2
0

Remove pgtype.Value interface

This commit is contained in:
Jack Christensen
2022-01-22 12:18:40 -06:00
parent 4cf6dc9447
commit db95cee40c
3 changed files with 4 additions and 71 deletions
+1 -12
View File
@@ -246,18 +246,7 @@ func (rows *connRows) Values() ([]interface{}, error) {
}
if dt, ok := rows.connInfo.DataTypeForOID(fd.DataTypeOID); ok {
if dt.Value != nil {
switch fd.Format {
case TextFormatCode:
values = append(values, string(buf))
case BinaryFormatCode:
newBuf := make([]byte, len(buf))
copy(newBuf, buf)
values = append(values, newBuf)
default:
rows.fatal(errors.New("Unknown format code"))
}
} else if dt.Codec != nil {
if dt.Codec != nil {
value, err := dt.Codec.DecodeValue(rows.connInfo, fd.DataTypeOID, fd.Format, buf)
if err != nil {
rows.fatal(err)