2
0

pgtype Float4 and Float8 fields include bit size

e.g. Instead of Float it is Float64. This matches the pattern set by the
database/sql types.
This commit is contained in:
Jack Christensen
2022-03-05 09:20:03 -06:00
parent d723a4ab6f
commit 84a3d91322
9 changed files with 57 additions and 57 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ func (f *Float8) ScanFloat64(n pgtype.Float8) error {
return nil
}
*f = Float8(n.Float)
*f = Float8(n.Float64)
return nil
}
@@ -26,7 +26,7 @@ func (f Float8) Float64Value() (pgtype.Float8, error) {
if f == 0 {
return pgtype.Float8{}, nil
}
return pgtype.Float8{Float: float64(f), Valid: true}, nil
return pgtype.Float8{Float64: float64(f), Valid: true}, nil
}
// Scan implements the database/sql Scanner interface.
@@ -42,7 +42,7 @@ func (f *Float8) Scan(src interface{}) error {
return err
}
*f = Float8(nullable.Float)
*f = Float8(nullable.Float64)
return nil
}