implement "remove" events

This commit is contained in:
Daniel Barlow
2024-04-21 11:19:06 +01:00
parent 762ce7b6b8
commit e9370358ae
2 changed files with 46 additions and 1 deletions

View File

@@ -26,7 +26,12 @@
:find (fn [_ terms] (find-in-database db terms))
:add (fn [_ event-string]
(let [e (parse-uevent event-string)]
(tset db e.path e)))
(match e.action
:add (tset db e.path e)
:change (tset db e.path e)
; ;bind ?
:remove (tset db e.path nil)
)))
:at-path (fn [_ path] (. db path))
}))