Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
lua-mdb
.gitignore
LICENSE.txt
Makefile
README.md
lua-mdb.test.lua
mdb_dump.lua

README.md

lua-mdb

Presentation

lua-mdb is a pure Lua module to read data.mdb files (from LMDB, not Microsoft Access).

If you actually want to use LMDB with Lua, this is probably not the module you are looking for. Check out lightningmdb.

This code is more a way for me to learn the internals of LMDB than anything practical. Long term, it could be useful to debug broken .mdb files or read them on another architecture (the MDB format is architecture-dependent).

Dependencies

Exclusively supports Lua 5.3. I have no interest in supporting older Lua-s or LuaJIT with this project and will not accept pull requests trying to do so (at least until the module reaches a stable state).

Tests require cwtest, lightningmdb and Penlight.

Usage

mdb_dump.lua

mdb_dump.lua is a re-implementation of the mdb_dump tool from LMDB. It can be used as an example of how to use the library. You can pass the number of bits of the platform on which the database was generated as the second argument, otherwise it will try to use the platform the code runs on.

The library

local reader = require "lua-mdb.reader"
local r = reader.new("path/to/data.mdb")
print(r:get("some_key"))

Copyright

  • Copyright (c) 2015-2016 Pierre Chapuis