aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/Storage.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/Storage.ml')
-rw-r--r--lib/kernel/Storage.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/kernel/Storage.ml b/lib/kernel/Storage.ml
index 665b1a7..d50735c 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