-
-
Notifications
You must be signed in to change notification settings - Fork 350
refactor: refactor funcs with generics #1123
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
Conversation
b842b51 to
c5fbbbc
Compare
|
非常期待这一特性,能减少生成代码中很多重复部分 |
|
MAJOR: Refactor Field and CRUD Layer to Use Generics (Go 1.18+) for GORM Code Gen This PR implements a major refactor of the query/model generation in the GORM code generator to leverage Go 1.18+ generics. The key motivation is to enable type-safe, extensible, and more expressive method signatures for generated DAOs and model field types, reducing code duplication and making method chains/types parameterizable. Major parts of the codebase related to model field types, the CRUD/data access layer, and template generation have been rewritten to support both legacy and new generic modes. There is also extensive regeneration of unit test expect files to verify generic support, and dependencies have been updated (notably, introducing The overall design introduces new generic abstractions ( Key Changes• Introduces generic wrapper types for model fields (e.g., Affected Areas• This summary was automatically generated by @propel-code-bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ship it! 🚢
Details
Why was this auto-approved?
AI analysis completed with no actionable comments or suggestions.
What did this pull request do?
User Case Description