Skip to content
New issue

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

Order By 无法执行自定义排序 #1113

Open
shuqingzai opened this issue Apr 1, 2024 · 0 comments
Open

Order By 无法执行自定义排序 #1113

shuqingzai opened this issue Apr 1, 2024 · 0 comments

Comments

@shuqingzai
Copy link

shuqingzai commented Apr 1, 2024

Your Question

参考: go-gorm/gorm#4404 自定义字段排序支持 GBK ,但是在 gen 中直接被 banned

伪代码

query.ProductSku.WithContext(ctx).Clauses(clause.OrderBy{
		Expression: clause.Expr{SQL: "CONVERT ( sku USING GBK ) ASC", WithoutParentheses: true},
	})

源代码:

if banClauses[cond.Name()] {

我该如何实现 GBK 排序??

The document you expected this should be explained

Expected answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant