commit | 9ebcc0957cdb9d3a32761b5b25cc6777e3266411 | [log] [tgz] |
---|---|---|
author | Dave Cottlehuber <dch@skunkwerks.at> | Mon Jan 20 20:13:33 2020 +0000 |
committer | Dave Cottlehuber <dch@skunkwerks.at> | Fri Mar 05 10:28:37 2021 +0000 |
tree | ee7ef8c11ae6c8a583690d9419b23e8ee80a243d | |
parent | 0eeca574cc0f0d93d383897a869afc5844ac65e9 [diff] |
look in /usr/local/bin/ before /usr/local/sbin/ according to [heir(7)](https://man.freebsd.org/cgi/hier) /sbin/ is for binaries fundamental to single-user and multi-user environments, which fdb is definitely not.
This project is a NIF wrapper for the FoundationDB C API. Documentation on the main API can be found here.
This project also provides a conforming implementation of the Tuple and Directory layers.
Assuming you have installed the FoundationDB C API library, building erlfdb is as simple as:
$ make
Alternatively, adding erlfdb as a rebar dependency should Just Work ®.
Documentation for installing FoundationDB can be found here for macOS or here for Linux.
A simple example showing how to open a database and read and write keys:
Eshell V9.3.3.6 (abort with ^G) 1> Db = erlfdb:open(<<"/usr/local/etc/foundationdb/fdb.cluster">>). {erlfdb_database,#Ref<0.2859661758.3941466120.85406>} 2> ok = erlfdb:set(Db, <<"foo">>, <<"bar">>). ok 3> erlfdb:get(Db, <<"foo">>). <<"bar">> 4> erlfdb:get(Db, <<"bar">>). not_found
FoundationDB has a custom binding tester that can be used to test whether changes have broken compatibility. See the BINDING_TESTER documentation for instructions on building and running that system.