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

feat: impl clause.Interface for using #118

Closed
wants to merge 1 commit into from

Conversation

hengyumo
Copy link

@hengyumo hengyumo commented Sep 19, 2023

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

impl clause.Interface for using

User Case Description

see go-gorm/gen#982

#117

如果我想要让 Clauses(dbresolver.Use("db_1") 可以正常被使用,需要让 dbresolver.using 实现 clause.Interface 接口

If I want 'Clauses(dbresolver.Use("db_1")' to be used normally, I need 'dbresolver.using' to implement the clause.Interface 'interface

@jinzhu
Copy link
Member

jinzhu commented Nov 22, 2023

Better to update the gen to support this.

@jinzhu jinzhu closed this Nov 22, 2023
@hengyumo
Copy link
Author

我觉得这边在gen改并不好改,dbresolver的using是私有的,gen并没有办法判断这个类型,大佬再看看?

@hengyumo
Copy link
Author

@jinzhu

@jinzhu
Copy link
Member

jinzhu commented Nov 22, 2023

gen 的 CheckClause 安全检查不太合理,后续应该会改改这个

@hengyumo
Copy link
Author

好的,谢谢大佬

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

Successfully merging this pull request may close these issues.

2 participants