From a7015900359c339ccc6096d924a05680b8c77a58 Mon Sep 17 00:00:00 2001 From: clyfe <40490+clyfe@users.noreply.github.com> Date: Tue, 26 Dec 2023 22:46:53 +0200 Subject: [PATCH] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2cfb2ba..e34a80f 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,17 @@ For a more complete example see [this test](test/clara_eav/rules_test.cljc). (:require [clara.rules :as r] [clara-eav.rules :as er])) -(er/defquery todo-q [?e] - [?todo <- er/entity :from [[?e]]]) +(er/defquery done-q [?e] + [?todo <- er/entity :from [[?e :todo/done true]]]) (er/defsession session 'my.sample) (-> session - (er/upsert #:todo{:eav/eid :new, :text "...", :done false}) + (er/upsert #:todo{:eav/eid :new, :text "...", :done true}) (r/fire-rules) - (r/query todo-q :?e :new)) + (r/query done-q :?e :new)) -; ({:?e :new, :?todo #:todo{:eav/eid :new, :text "...", :done false}}) +;; ({:?e :new, :?todo {:eav/eid :new, :todo/text "...", :todo/done true}}) ``` ## Guide