Skip to content

Commit b8dcdf7

Browse files
committed
Additional comments where code is copied/mirrored
1 parent 8e2faff commit b8dcdf7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

statement.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
132132

133133
type converter struct{}
134134

135+
// ConvertValue mirrors the reference/default converter in database/sql/driver
136+
// with _one_ exception. We support uint64 with their high bit and the default
137+
// implementation does not. This function should be kept in sync with
138+
// database/sql/driver defaultConverter.ConvertValue() except for that
139+
// deliberate difference.
135140
func (c converter) ConvertValue(v interface{}) (driver.Value, error) {
136141
if driver.IsValue(v) {
137142
return v, nil
@@ -194,7 +199,8 @@ var valuerReflectType = reflect.TypeOf((*driver.Valuer)(nil)).Elem()
194199
// still use nil pointers to those types to mean nil/NULL, just like
195200
// string/*string.
196201
//
197-
// This function is copied from the database/sql package.
202+
// This is an exact copy of the same-named unexported function from the
203+
// database/sql package.
198204
func callValuerValue(vr driver.Valuer) (v driver.Value, err error) {
199205
if rv := reflect.ValueOf(vr); rv.Kind() == reflect.Ptr &&
200206
rv.IsNil() &&

0 commit comments

Comments
 (0)