* fix: 表结构同步修复
* fix: 达梦低权限兼容,pgsql bool值转换
This commit is contained in:
zongyangleo
2025-03-17 11:12:52 +00:00
committed by Coder慌
parent bc21ba7c1e
commit 3c0292b56e
10 changed files with 77 additions and 24 deletions

View File

@@ -156,6 +156,12 @@ func SQLValueNumeric(val any) string {
}
return fmt.Sprintf("%v", val)
}
func SQLValueBool(val any) string {
if val == nil {
return "false"
}
return fmt.Sprintf("%v", cast.ToBool(val))
}
func SQLValueString(val any) string {
if val == nil {
@@ -177,6 +183,12 @@ var (
SQLValue: SQLValueNumeric,
}
DTBool = &DataType{
Name: "bool",
Valuer: ValuerBit,
SQLValue: SQLValueBool,
}
DTByte = &DataType{
Name: "uint8",
Valuer: ValuerByte,