commit | 1e622748cce436fca993f696e59f624d5e59d484 | [log] [tgz] |
---|---|---|
author | Kyle Snavely <kjsnavely@gmail.com> | Wed Mar 25 20:48:37 2020 -0600 |
committer | Kyle Snavely <kjsnavely@gmail.com> | Fri Mar 27 10:00:45 2020 -0600 |
tree | 6542b48d1eb9a38710e6ad27d71abb6640af25af | |
parent | 6f59a39f4fd52a05c470545913c2a81fdd80f6d1 [diff] |
erlfdb_tuple:encode/2 should provide a clear error message when provided with a bad term to encode
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.