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

Why not generate very common model/database operation methods such as BulkInsert , BulkUpdate, or SoftDelete via goctl model by default? #4528

Closed
dahuzihaidao opened this issue Dec 26, 2024 · 2 comments

Comments

@dahuzihaidao
Copy link

goctl model only generate very a few model operation methods, common methods like BulkInsert , BulkUpdate, or SoftDelete are not provided. Why not provide these methods?

@dahuzihaidao dahuzihaidao changed the title Why not provide very common model/database operation methods such as BulkInsert , BulkUpdate, or SoftDelete? Why not generate very common model/database operation methods such as BulkInsert , BulkUpdate, or SoftDelete via goctl model by default? Dec 26, 2024
@kesonan
Copy link
Collaborator

kesonan commented Dec 27, 2024

Because these are not general business methods

@dahuzihaidao
Copy link
Author

dahuzihaidao commented Dec 27, 2024

Got your point, however it is pretty common usage in my company and related business :)

It's better at least to provide a option for users to choose between populating more rich db operation methods or less standard set, which may suit all people's needs.

which can inlcude even more methods, like "findPageLimit". Also, it can be put into a seperate .tpl file and being included when needed.

These methods can use primary key or unique index to query, so I think it fits the cache usage.

Thanks!

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

2 participants