diff options
Diffstat (limited to 'lib/kernel/Storage.ml')
| -rw-r--r-- | lib/kernel/Storage.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/kernel/Storage.ml b/lib/kernel/Storage.ml index dd06783..f0c4800 100644 --- a/lib/kernel/Storage.ml +++ b/lib/kernel/Storage.ml @@ -36,11 +36,14 @@ module Make (S : Abstract.Storage.STORAGE) = struct let _ = S.abort tx in Error condition - let with_transaction connection body = + let within start connection body = let open Utilities.Result in - let* tx = S.start connection in + let* tx = start connection in body tx |> finish tx + let with_transaction connection = within S.start connection + let with_read connection = within S.start_read connection + let store_blob tx blob = let open Utilities.Result in let address = Concepts.Hash.hash_of_blob blob in |
