@hackage libmdbx0.1.0.2

Bindings for libmdbx, an embedded key/value store

libmdbx-hs

A libmdbx wrapper, providing low level access to its API plus a set of high level functions for common operations.

Excerpt from libmdbx's documentation:

libmdbx is an extremely fast, compact, powerful, embedded, transactional key-value database, with permissive license.

Historically, libmdbx is a deeply revised and extended descendant of the amazing Lightning Memory-Mapped Database. libmdbx inherits all benefits from LMDB, but resolves some issues and adds a set of improvements.

Usage

Low level interface

Using libmdbx low level interface involves the following steps:

  • Opening an environment. This is the equivalent of a database.
  • Opening a database. This is the equivalent of a table.
  • Creating a transaction.
  • Performing CRUD operations/using a cursor.
  • Committing or aborting the transaction.

You can check Hackage for the low level interface or libmdbx documentation for more details on internals.

High level interface

Alternatively you can use the higher level interface which, although it provides a more limited set of operations, takes care of transaction handling and makes the common use cases really simple.

For the high level interface check Hackage or the sample application here.

Common

In both scenarios, you will want to check Hackage for information on how to make your data types compatible with libmdbx-hs.

Dependencies

Source code for libmdbx is included in the repository and built with the rest of the project, to avoid requiring a separate library install.

License

libmdbx is licensed under the The OpenLDAP Public License.

libmdbx-hs is licensed under the BSD-3 License.

  • Installation

  • Dependencies (3)

  • Dependents (0)