An embedded, single-file key-value store for OCaml, inspired by BoltDB and LMDB.
at main 986 B view raw
1(** Cursor for iterating over key-value pairs *) 2 3(** Cursor handle parameterized by transaction mode *) 4type 'mode t 5 6(** Convert cursor to a sequence of key-value pairs. 7 8 The keys and values in the sequence are zero-copy slices and 9 are only valid during the transaction lifetime. 10 11 Copy them if you need them to outlive the transaction. *) 12val to_seq : 'mode t -> (Types.key * Types.value) Seq.t 13 14(** Seek to a specific key *) 15val seek : 'mode t -> Types.key -> unit 16 17(** Move to first key. Returns a zero-copy view into the database. *) 18val first : 'mode t -> (Types.key * Types.value) option 19 20(** Move to last key. Returns a zero-copy view into the database. *) 21val last : 'mode t -> (Types.key * Types.value) option 22 23(** Move to next key. Returns a zero-copy view into the database. *) 24val next : 'mode t -> (Types.key * Types.value) option 25 26(** Move to previous key. Returns a zero-copy view into the database. *) 27val prev : 'mode t -> (Types.key * Types.value) option