tocc icon indicating copy to clipboard operation
tocc copied to clipboard

Transactions

Open aidin36 opened this issue 11 years ago • 1 comments

Client of libtocc should have an option to start and then commit/rollback transactions.

For example, if user passes --import and --assign to the CLI, the CLI will first import files and then assign tags to them. What if the second action fails? Or worse, after some files are imported, it fails to import others.

There's a lot of other situations we need transactions.

Things to consider:

  1. UnQlite supports transactions. But we also need transactions in file system layer.
  2. We should design a clean and easy-to-use interface for starting and ending transactions.

Discuss your ideas here.

aidin36 avatar May 07 '14 02:05 aidin36

A note about the number 2 above: Beside the methods to start/commit/rollback transactions, there should be a way to auto-manage a transaction. Something like Python's with keyword, or C#'s using keyword.

aidin36 avatar May 30 '14 12:05 aidin36