git » hoplite.git » commit 8c2579a

don't use paths

author Alan Dipert
2021-06-02 20:05:19 UTC
committer Alan Dipert
2021-06-02 20:05:19 UTC
parent 78dbaca16d4cda2d1ad3c03a0d4ff82a1896aab6

don't use paths

todo.mjs +8 -5

diff --git a/todo.mjs b/todo.mjs
index 6468eb6..91c2460 100644
--- a/todo.mjs
+++ b/todo.mjs
@@ -2,11 +2,14 @@ import { query, _, ANY, paths } from './datalog.mjs';
 import { input, formula, database, view } from './reactives.mjs';
 import { $el, entities } from './el.mjs';
 
-let todos = database(paths([
-  {text: "do the thing", status: "ready"},
-  {text: "do the other thing", status: "ready"},
-  {text: "do that last thing", status: "done"}
-]));
+let todos = database([
+  [0, "text", "do the thing"],
+  [0, "status", "ready"],
+  [1, "text", "do the other thing"],
+  [1, "status", "ready"],
+  [2, "text", "do that last thing"],
+  [2, "status", "done"]
+]);
 
 let showStatus = input(ANY.VALUE);