Skip to content

Commit b2cd472

Browse files
committed
fix review issues, replace call with known value
1 parent 654304f commit b2cd472

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

statement.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,6 @@ func (converter) ConvertValue(v interface{}) (driver.Value, error) {
124124
return v, nil
125125
}
126126

127-
if svi, ok := v.(driver.Valuer); ok {
128-
sv, err := svi.Value()
129-
if err != nil {
130-
return nil, err
131-
}
132-
if !driver.IsValue(sv) {
133-
return nil, fmt.Errorf("non-Value type %T returned from Value", sv)
134-
}
135-
return sv, nil
136-
}
137-
138127
rv := reflect.ValueOf(v)
139128
switch rv.Kind() {
140129
case reflect.Ptr:
@@ -150,7 +139,7 @@ func (converter) ConvertValue(v interface{}) (driver.Value, error) {
150139
case reflect.Uint64:
151140
u64 := rv.Uint()
152141
if u64 >= 1<<63 {
153-
return fmt.Sprintf("%d", rv.Uint()), nil
142+
return fmt.Sprintf("%d", u64), nil
154143
}
155144
return int64(u64), nil
156145
case reflect.Float32, reflect.Float64:

0 commit comments

Comments
 (0)