fix: dm Database Clob field conversion error (#2405)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2405 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zzdboy <28206697@qq.com> Co-committed-by: zzdboy <28206697@qq.com>
This commit is contained in:
parent
e884f059a4
commit
5301cc0ae9
|
@ -831,6 +831,13 @@ func (d *dmClobScanner) Scan(data interface{}) error {
|
|||
d.data = string(t)
|
||||
d.valid = true
|
||||
return nil
|
||||
case string:
|
||||
if len(t) <= 0 {
|
||||
return nil
|
||||
}
|
||||
d.data = string(t)
|
||||
d.valid = true
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("cannot convert %T as dmClobScanner", data)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue