aboutsummaryrefslogtreecommitdiffstats
path: root/lib/backend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backend')
-rw-r--r--lib/backend/storage/LMDB.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/backend/storage/LMDB.ml b/lib/backend/storage/LMDB.ml
index 92de30e..e364b6a 100644
--- a/lib/backend/storage/LMDB.ml
+++ b/lib/backend/storage/LMDB.ml
@@ -167,6 +167,8 @@ let connect (c : Concepts.Configuration.term) =
Concepts.Condition.(
complement ("path" |=| Concepts.Value.String path & "mode" |=| Concepts.Value.Integer mode) )
+let disconnect ({env; _} : connection) = C.mdb_env_close env
+
let begin_with flags ({env; dbi} : connection) =
C.mdb_txn_begin' env C.null_txn flags
|> Result.map (fun tx -> {tx; dbi; active = true;})