diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-23 03:40:37 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-23 03:40:37 -0300 |
| commit | 41c6334bf21b1cbae228b1d75bf3d095ba84bcca (patch) | |
| tree | 34b939e70fe7cc44f4ae3434fc808cd59f2225d5 /lib/backend | |
| parent | 28c55a730d9a0a19a62d85c166dc879aebd7b772 (diff) | |
| download | RNT-41c6334bf21b1cbae228b1d75bf3d095ba84bcca.tar.gz RNT-41c6334bf21b1cbae228b1d75bf3d095ba84bcca.zip | |
allow to close storage
Diffstat (limited to '')
| -rw-r--r-- | lib/backend/storage/LMDB.ml | 2 |
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;}) |
