cdb reader
Erlang
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src
test
.gitignore
LICENSE
README.md
rebar

README.md

ecdb

cdb file reader in erlang

Reference

D.J. Bernstein cdb

Build

./rebar compile

Example

Data fed to cdbmake to produce cdbfile used in this example

+3,5:one->Hello
+3,5:two->Hello
+3,5:two->World
  1. Open cdb file
Fd = ecdb:cdbopen("cdbfile").
  1. Lookup
[<<"Hello">>] = ecdb:cdbget(Fd, <<"one">>),
[<<"Hello">>, <<"World">>] = ecdb:cdbget(Fd, <<"two">>).
false = ecdb:cdbget(Fd, <<"non_exist">>).
  1. Close cdb file
ok = ecdb:cdbclose(Fd).

Test

./rebar eunit