Skip to content

KailunChuang/matlab-lmdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matlab LMDB

Matlab LMDB wrapper.

Build

addpath /path/to/matlab-lmdb;
lmdb.make();

To specify optional build flags:

lmdb.make('all', '-I/opt/local/include -L/opt/local/lib');
lmdb.make('clean');

Run a test:

lmdb.make('test');

Example

% Open and close.
database = lmdb.DB('./db');
readonly_database = lmdb.DB('./db', 'RDONLY', true);
clear readonly_database;

% Read and write.
database.put('key1', 'value1');
database.put('key2', 'value2');
value1 = database.get('key1');
database.remove('key1');

% Iterator.
database.each(@(key, value) disp([key, ': ', value]));
count = database.reduce(@(key, value, count) count + 1, 0);

TODO

  • Finer transaction API.

About

Matlab LMDB wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 77.0%
  • C++ 18.2%
  • MATLAB 2.6%
  • Roff 1.5%
  • Makefile 0.7%