Browse Source

达梦转换异常修复

master v1.7.9
loshiqi 3 hours ago
parent
commit
26657dc0ae
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      common.go

+ 7
- 2
common.go View File

@ -97,7 +97,7 @@ func isInStringLiteral(sql, match string) bool {
func ToString(value interface{}) string {
switch v := value.(type) {
case string:
return v
return value.(string)
case []byte:
return string(v)
case int, int8, int16, int32, int64:
@ -109,7 +109,12 @@ func ToString(value interface{}) string {
case bool:
return strconv.FormatBool(v)
case time.Time:
return v.Format("2006-01-02 15:04:05")
//return v.Format("2006-01-02 15:04:05")
return value.(time.Time).Format("2006-01-02 15:04:05")
case interface{}:
return value.(string)
case nil:
return ""
default:
return fmt.Sprintf("%v", v)
}


Loading…
Cancel
Save