An embedded, single-file key-value store for OCaml, inspired by BoltDB and LMDB.
1(** Database handle and operations *)
2
3(** Opaque database handle *)
4type t
5
6(** Open or create a database file *)
7val open_db : string -> (t, Error.t) result
8
9(** Close the database *)
10val close : t -> (unit, Error.t) result
11
12(** Get database metadata *)
13val metadata : t -> Types.metadata
14
15(** Execute a read-only transaction *)
16val view : t -> (Types.ro Txn.t -> ('a, Error.t) result) -> ('a, Error.t) result
17
18(** Execute a read-write transaction *)
19val update : t -> (Types.rw Txn.t -> ('a, Error.t) result) -> ('a, Error.t) result