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
Hi
I understand the github api typically operates on individual requests.
But in most my case here in my application, I must make sure two files (even more) are updated in a transactional way, like in database.
Either both success or both failed.
I can implement something like revertFirstCommit to handle one by one, but this is too much efforts.
Wondering if can from lib natively provide similar as we have in database commit/rollback.
err := dao.WithTransaction(dao.GetDB(), func(tx dao.Transaction) error {
//
for _, c := range tableColumnsList {
err := dao.UpdateTableColumn(ctx, tx, c)
if err != nil {
zap.L().Sugar().Error(err)
return err
}
}
err := dao.UpdateTable(ctx, tx, tableDto)
if err != nil {
zap.L().Sugar().Error(err)
return err
}
The text was updated successfully, but these errors were encountered:
This is the perfect opportunity for you to create a helper repo that is completely independent of this one, and once you get it working well, you can create a PR that points to it from our README.md just like we have done for the ghinstallation repo.
We decided long back that this repo will be dedicated to the core functionality of making the GitHub v3 API easy to use from the Go programming language, and that all other helpers should go in external repos. This is done for a number of reasons, and if you are inclined, you can search for the discussions we had years ago on this topic.
We'll leave this issue open for a while in case there is more discussion or in case you would like to use this issue to refer to from your PR where you update this repo's README.md.
Hi
I understand the github api typically operates on individual requests.
But in most my case here in my application, I must make sure two files (even more) are updated in a transactional way, like in database.
Either both success or both failed.
I can implement something like revertFirstCommit to handle one by one, but this is too much efforts.
Wondering if can from lib natively provide similar as we have in database commit/rollback.
The text was updated successfully, but these errors were encountered: