Commit ceee9f6408f710d98e12ad88028e735388a69328

Thomas de Grivel 2024-10-19T11:36:57

wip config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/lib/kc3/0.1/config.kc3 b/lib/kc3/0.1/config.kc3
new file mode 100644
index 0000000..f15bf48
--- /dev/null
+++ b/lib/kc3/0.1/config.kc3
@@ -0,0 +1,10 @@
+defmodule Config do
+
+  def db = Facts.database()
+
+  def get = fn (module, key) {
+    Facts.first_with(db, [[module, :config, config = ?],
+                          [config, key, value = ?]],
+      value)
+  def set = fn (module, assoc) {
+    Facts.add_tags(