Skip to content
.NET library for LMDB key-value store
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
mdb @ 4d21543 Also updating Mac binary for lmdb May 29, 2017
src
.gitignore Ignoring Rider files Jul 28, 2016
.gitmodules Switch to GitHub-hosted LMDB submodule Jul 1, 2015
.travis.yml Dotnet upgrade (#88) Mar 11, 2017
README.md Update example in README.md Mar 21, 2017
appveyor.yml
build.cmd Adding dotnet info to build Mar 11, 2017
build.sh Dotnet upgrade (#88) Mar 11, 2017

README.md

Lightning.NET

Join the chat at https://gitter.im/CoreyKaylor/Lightning.NET Linux Build Status Windows Build status

.NET library for OpenLDAP's LMDB key-value store.

The API is easy to use and extremely fast.

using (var env = new LightningEnvironment("pathtofolder"))
{
	env.MaxDatabases = 2;
	env.Open();

	using (var tx = env.BeginTransaction())
	using (var db = tx.OpenDatabase("custom", new DatabaseConfiguration { Flags = DatabaseOpenFlags.Create }))
	{
		tx.Put(db, Encoding.UTF8.GetBytes("hello"), Encoding.UTF8.GetBytes("world"));
		tx.Commit();
	}
	using (var tx = env.BeginTransaction(TransactionBeginFlags.ReadOnly))
	using (var db = tx.OpenDatabase("custom"))
	{
		var result = tx.Get(db, Encoding.UTF8.GetBytes("hello"));
		Assert.Equal(result, Encoding.UTF8.GetBytes("world"));
	}
}

More examples can be found in the unit tests.

Official LMDB API docs

Library is available from NuGet: https://www.nuget.org/packages/LightningDB/

The library is published under MIT license.

You can’t perform that action at this time.