2
0

pgtype.DataType.Codec can never be nil

This commit is contained in:
Jack Christensen
2022-01-22 12:21:16 -06:00
parent db95cee40c
commit 2b395f3730
4 changed files with 35 additions and 51 deletions
+4 -6
View File
@@ -246,13 +246,11 @@ func (rows *connRows) Values() ([]interface{}, error) {
}
if dt, ok := rows.connInfo.DataTypeForOID(fd.DataTypeOID); ok {
if dt.Codec != nil {
value, err := dt.Codec.DecodeValue(rows.connInfo, fd.DataTypeOID, fd.Format, buf)
if err != nil {
rows.fatal(err)
}
values = append(values, value)
value, err := dt.Codec.DecodeValue(rows.connInfo, fd.DataTypeOID, fd.Format, buf)
if err != nil {
rows.fatal(err)
}
values = append(values, value)
} else {
switch fd.Format {
case TextFormatCode: