Download Latest Version 1.3.1 source code.zip (104.2 kB)
Email in envelope

Get an email when there's a new version of O'Doyle

Home / 1.1.0
Name Modified Size InfoDownloads / Week
Parent folder
1.1.0 source code.tar.gz 2023-05-24 93.9 kB
1.1.0 source code.zip 2023-05-24 103.8 kB
README.md 2023-05-24 860 Bytes
Totals: 3 Items   198.6 kB 0

This release enables attributes to be matched with binding symbols in the :what block. Up until now, only the id and value could have a binding symbol.

This can be a helpful tool for debugging or tracking. You can now make a quick rule that prints out every time a fact with a given id and/or value is inserted, regardless of the attribute.

You can even make a tuple like [id attr value], which matches on every fact! Why is this useful? It usually isn't...but one cool use case is when you want to retract every fact with a given id. Now, you can make a rule like this:

:::clj
[:what
 [id ::remove? true]
 [id attr      value]
 :then
 (o/retract! id attr)]

Then, when you insert [123 ::remove? true], the rule will trigger on every fact whose id is 123 (thanks to the join on id) and they will all be retracted.

Source: README.md, updated 2023-05-24