2021年3月21日星期日

design pattern for undoing after I have commited the changes

We can undo an action using Command or Memento pattern.

If we are using kafka then we can replay the stream in reverse order to go back to the previous state.

For example, Google docs/sheet etc. also has version history.

in case of pcpartpicker, it looks like the following:

enter image description here

For being safe, I want to commit everything but want to go back to the previous state if needed.

I know we can disable auto-commit and use Transaction Control Language (COMMIT, ROLLBACK, SAVEPOINT). But I am talking about undoing even after I have commited the change.

How can I do That?

https://stackoverflow.com/questions/66740216/design-pattern-for-undoing-after-i-have-commited-the-changes March 22, 2021 at 12:06PM

没有评论:

发表评论