[fix] 修复 converting NULL to string is unsupported 错误

This commit is contained in:
2023-06-21 13:12:09 +08:00
parent 28d9dcbd4d
commit 5740d11240
2 changed files with 27 additions and 22 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ func TestScanJsonFieldStruct(t *testing.T) {
Arr []int64 `db:"arr"`
}{}
myConn.Select(`select 0 as id, 'test' as code, '{"a":1}' as map, '[3, 4]' as arr`, []any{}, &dest)
myConn.Select(`select 0 as id, NULL as code, '{"a":1}' as map, '[3, 4]' as arr`, []any{}, &dest)
t.Log(dest)
}