Skip to content

Kotlin multi-platform library for OpenLDAP's LMDB key-value store.

Notifications You must be signed in to change notification settings

CoreyKaylor/kotlin-lmdb

Repository files navigation

kotlin-lmdb

Kotlin multi-platform library for OpenLDAP's LMDB key-value store.

This is not a wrapper around other libraries. Kotlin-Native uses cinterop and JVM uses JNR-FFI for communicating directly with LMDB native lib.

It's very early still, but the foundation is laid for a good consistent API that starts very early with multi-platform considerations out of the way.

val envDir = "path_to_directory_for_data"
val env = Env()
env.open(envDir)
env.beginTxn { tx ->
    val dbi = tx.dbiOpen()
    tx.put(dbi, "test".encodeToByteArray(), "value".encodeToByteArray())
    tx.commit()
}
env.close()

Official LMDB API docs

About

Kotlin multi-platform library for OpenLDAP's LMDB key-value store.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages