mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
add float types to database/sql ColumnType ScanType()
This commit is contained in:
parent
897e90f353
commit
81dbdeea7a
@ -53,6 +53,10 @@ func (fd FieldDescription) PrecisionScale() (precision, scale int64, ok bool) {
|
||||
|
||||
func (fd FieldDescription) Type() reflect.Type {
|
||||
switch fd.DataType {
|
||||
case pgtype.Float8OID:
|
||||
return reflect.TypeOf(float64(0))
|
||||
case pgtype.Float4OID:
|
||||
return reflect.TypeOf(float32(0))
|
||||
case pgtype.Int8OID:
|
||||
return reflect.TypeOf(int64(0))
|
||||
case pgtype.Int4OID:
|
||||
|
Loading…
x
Reference in New Issue
Block a user