You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2021. It is now read-only.
大哥好,你现在这样封装肯定可以。
问题初衷:
如何在外部控制事务提交?
因为提交事务的操作中可能还有其他操作,不是简单 tran.Commit() 就完事。
如果把事务提交权交给 Cap,整个事务就终断。
伪代码如下:
建议:开放 Flush 方法给外部使用
Cap 作者否决了我的意图,不给支持,其实很简单的一个改动。如果每个数据库自己 copy 代码来改比较复杂,建议代码如下:
这样一来就不用为每个数据库去做这个了