package lmdb

  1. Overview
  2. Docs
Bindings for LMDB, a fast in-file database with ACID transactions

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.1.1.tar.gz
md5=07b36ae61d71a2666de177dfdf331524
sha512=d6a1978c2a69da9f6bd1bc929a5eab7c61a94fdba31bbc95961d21634da7ff12946e3636142e60ff67d1650b785ec38d3ad8d3be9498dcb66dadc02ee8323241

Description

Tags

clib:lmdb database

Published: 23 Jan 2026

README

OCaml-lmdb Build Status docs

The LMDB database is a fast in-file database that supports ACID transactions.

These bindings expose a typesafe yet low-overhead API. Both transactions and cursors are available. Database implementations are specialized both by keys and values. Two module are predefined: Lmdb.Db (string keys and string values) and Lmdb.IntDb (int keys and string values). New implementation (which can use special LMDB features such as multi-values) can be added via a functorial interface.

Please consult the documentation and a simple example.

let open Lmdb in
let env = Env.(create Rw ~flags:Flags.no_subdir ~max_maps:1) "mydb" in
let map = Map.create Nodup ~key:Conv.string ~value:Conv.string
	    ~name:"Camelidae" env in
Map.add map "Bactrian camel" "Elegant and beautiful animal with two humps."

Dependencies (5)

  1. conf-pkg-config build
  2. dune-configurator build
  3. dune >= "3.14"
  4. bigstringaf >= "0.10.0"
  5. ocaml >= "4.07"

Dev Dependencies (3)

  1. odoc with-doc
  2. benchmark with-test
  3. alcotest with-test

Used by

None

Conflicts

None