File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -200,10 +200,15 @@ func IsScanValue(v interface{}) bool {
200
200
// ValueConverter that's used when a Stmt doesn't implement
201
201
// ColumnConverter.
202
202
//
203
- // DefaultParameterConverter returns the given value directly if
204
- // IsValue(value). Otherwise integer type are converted to
205
- // int64, floats to float64, and strings to []byte. Other types are
206
- // an error.
203
+ // DefaultParameterConverter returns its argument directly if
204
+ // IsValue(arg). Otherwise, if the argument implements Valuer, its
205
+ // Value method is used to return a Value. As a fallback, the provided
206
+ // argument's underlying type is used to convert it to a Value:
207
+ // underlying integer types are converted to int64, floats to float64,
208
+ // and strings to []byte. If the argument is a nil pointer,
209
+ // ConvertValue returns a nil Value. If the argument is a non-nil
210
+ // pointer, it is dereferenced and ConvertValue is called
211
+ // recursively. Other types are an error.
207
212
var DefaultParameterConverter defaultConverter
208
213
209
214
type defaultConverter struct {}
You can’t perform that action at this time.
0 commit comments