summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2021-01-09 09:45:04 +0100
committerpukkamustard <pukkamustard@posteo.net>2021-01-09 09:45:04 +0100
commit02d2895986ad5c5772f811466f89bd8229548851 (patch)
tree984599eb32bd844006bc0c5eb14cb568e909a0a5
parentd7df5a81bf1c8124e9bd31f887c102dd20b94999 (diff)
README: Add notes on interfaces
-rw-r--r--README.org19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.org b/README.org
index 8b242cb..7da8338 100644
--- a/README.org
+++ b/README.org
@@ -4,7 +4,16 @@
Guile bindings to the Lightning Memory-Mapped Database (LMDB).
+[[https://symas.com/lmdb/][LMDB]] is a high-performance embedded key-value store. ~guile-lmdb~ provides bindings for using LMDB from [[https://www.gnu.org/software/guile/][Guile]].
+
+Two interfaces (APIs) are provided:
+
+- ~(lmdb)~ :: Provides an [[https://srfi.schemers.org/srfi-167/srfi-167.html][SRFI-167]] style interface to LMDB.
+- ~(lmdb low-level)~ :: Low-level bindings that aim to be as close to the [[http://www.lmdb.tech/doc/group__mdb.html#details][LMDB C API]] as possible with minimal helpers (pointers to LMDB structures are wrapped as Guile types). This allows almost direct translation of C code using LMDB to Guile code.
+
+
* Example
+** ~(lmdb)~
#+BEGIN_SRC scheme
@@ -22,6 +31,7 @@ Guile bindings to the Lightning Memory-Mapped Database (LMDB).
(lmdb-delete! db (string->utf8 "Hello"))
#+END_SRC
+** ~(lmdb low-level)~
#+BEGIN_SRC scheme
(use-modules (lmdb low-level))
@@ -52,3 +62,12 @@ Guile bindings to the Lightning Memory-Mapped Database (LMDB).
(mdb-env-close env)
#+END_SRC
+
+* TODOs
+** TODO Threads & Transactions
+
+LMDB only allows a single transaction per thread and will lock if multiple transactions are requested. Solve this with some in Guile magic.
+
+** TODO Flags
+
+Currently no flags can be passed to the ~mdb-*~ functions.