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

事务的实现方式 #68

Open
HaminyG opened this issue Feb 15, 2023 · 2 comments
Open

事务的实现方式 #68

HaminyG opened this issue Feb 15, 2023 · 2 comments

Comments

@HaminyG
Copy link

HaminyG commented Feb 15, 2023

您好,这份代码质量非常的高。但是事务的话,现在只能在store里面的每个接口加入db *gorm.DB的参数。不知道如何设计才会更加优雅。

@Gaozizhong
Copy link

@HaminyG 请问有什么实现事务的好方法了吗?

@Gaozizhong
Copy link

是不是直接在story.go中实现Begin,Rollback,Commit函数会比较优雅

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