We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eg:
type ReportStatus int type DotCrawlInfo struct { ReportStatus entity.ReportStatus `jsd:"report_status"` WebsiteStatus entity.ReportStatus `jsd:"website_status"` }
在jsd中反射出来的时候提示错误
infos = []*model.DotCrawlInfo{} db := gsd.MustOpen(_TABLE_SQL_SITE_RECORD) err = db.Select( _ColReportStatus, _ColWebsiteStatus).From(_Table). Where(filter). Page(PI.PageIndex, PI.PageSize).Fill(&infos) if err != nil { fmt.Println("Error:", err.Error()) } return
提示类型无法反射无法从tinyiint(4) -> type ReportStatus int
这种如何解决~~
The text was updated successfully, but these errors were encountered:
基于性能考虑,gsd 在反射这一块做了极大的优化,所以目前并没有实现自动类型转换。但最新版已经添加对基础类型的自定义类型的兼容,只要底层类型是一致的,就没有问题,如数据库类型是 int32,自定义类型也是基于 int32 的,就可以兼容,但如果自定义类型是基于 int64 的就不能兼容了
Sorry, something went wrong.
No branches or pull requests
eg:
在jsd中反射出来的时候提示错误
提示类型无法反射无法从tinyiint(4) -> type ReportStatus int
这种如何解决~~
The text was updated successfully, but these errors were encountered: