gorm-driver-dm icon indicating copy to clipboard operation
gorm-driver-dm copied to clipboard

达梦数据库gorm驱动

Results 4 gorm-driver-dm issues
Sort by recently updated
recently updated
newest added

https://eco.dameng.com/community/article/765cc5688e65be1a5be6bb2fdc0410b8 使用go语言遇到读取text类型报错的问题。 报错信息: sql: Scan error on column index 9, name “resource_ids”: unsupported Scan, storing driver.Value type *dm.DmClob into type *string Golang 在表字段类型为TEXT时,解析为string类型失败; go语言是grom框架 比较MySQL和DM8中jdbc返回类型,mysql的做法是转成[]uint8,达梦里面是转成DmClob,所以导致报错,最新的处理方式是增加一个配置项,兼容MySQL这种用法。 1、连接串的地方增加localhost:5236?compatibleMode=mysql 2、使用最新的go驱动包。 按照官网的说法,获取这个新的包,仍不对呢

数据库表中有数据时,使用in 进行数据查找,如果参数是nil,查询报字符串转化错误,错误堆栈信息如下: ` Error -6111: 字符串转换出错 1). github.com/jeyrce/gorm-dm8-driver/dmr.(*dm_build_741).dm_build_774 H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/zq.go:708 2). github.com/jeyrce/gorm-dm8-driver/dmr.(*dm_build_741).dm_build_730 H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/zq.go:695 3). github.com/jeyrce/gorm-dm8-driver/dmr.(*dm_build_741).dm_build_733 H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/zq.go:745 4). github.com/jeyrce/gorm-dm8-driver/dmr.(*dm_build_332).dm_build_372 H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/a.go:247 5). github.com/jeyrce/gorm-dm8-driver/dmr.(*dm_build_332).Dm_build_439 H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/a.go:452 6). github.com/jeyrce/gorm-dm8-driver/dmr.(*DmStatement).executeInner H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/u.go:882 7). github.com/jeyrce/gorm-dm8-driver/dmr.(*DmStatement).query H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/u.go:418 8). github.com/jeyrce/gorm-dm8-driver/dmr.(*DmStatement).queryContext H:/CVICSE/dm/pkg/mod/github.com/jeyrce/[email protected]/dmr/u.go:437...

表数据结构如下 type Department struct { Model Name string `json:"name" gorm:"index"` ParentID *int `json:"parent_id" gorm:"index"` Level int `gorm:"default:0" json:"level"` DeptCode string `json:"dept_code" gorm:"unique;index"` Users []User `gorm:"many2many:users_departments;" json:"-"` DisplayOrder int `gorm:"default:0" json:"display_order"`...

作者您好,我在测试这个驱动时,insert数据后带不出自增ID,请问如何实现这个功能?