commit | 744a83bcbc93ccf5a3751aee44e2182d945163b9 | [log] [tgz] |
---|---|---|
author | Adam Kocoloski <kocolosk@apache.org> | Wed Nov 17 10:48:45 2021 -0500 |
committer | GitHub <noreply@github.com> | Wed Nov 17 10:48:45 2021 -0500 |
tree | cce36ddf3178e734f088f4b4a505b4d027f356dd | |
parent | a367af4072e821d170aae442a634dc731dbfc860 [diff] |
Refactor build matrix (#43) Rework and simplify the build through the following enhancements: * Build against multiple Erlang/OTP versions * Merge Ubuntu and Windows into a matrix build * Simplify config by using default fdb.cluster The last one is a bit obvious in hindsight. We don't need to be passing around custom overrides for the fdb.cluster file location; all we really need to do is just trust FDB to figure it out on each platform. To do this we allow for setting the test_cluster_file env to `system_default` instead of a path to a specific cluster file.
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.