nil point transfer '<nil>' not transfer NULL #3604

This commit is contained in:
TABRIZ ATAYI 2020-10-18 00:05:43 +02:00
parent 08ecef8e0b
commit d825554307
1 changed files with 0 additions and 2 deletions

View File

@ -48,8 +48,6 @@ func ExplainSQL(sql string, numericPlaceholder *regexp.Regexp, escaper string, a
} else {
vars[idx] = "NULL"
}
case fmt.Stringer:
vars[idx] = escaper + strings.Replace(fmt.Sprintf("%v", v), escaper, "\\"+escaper, -1) + escaper
case driver.Valuer:
reflectValue := reflect.ValueOf(v)
if v != nil && reflectValue.IsValid() && ((reflectValue.Kind() == reflect.Ptr && !reflectValue.IsNil()) || reflectValue.Kind() != reflect.Ptr) {