oakes / odoyle-rules

A rules engine for Clojure(Script)
The Unlicense
530 stars 20 forks source link

Add `upsert` #25

Closed ertugrulcetin closed 12 months ago

ertugrulcetin commented 1 year ago

Adds upsert fn.

oakes commented 12 months ago

This is using query-all so it would only work if there is a rule whose name is the same as id and has a :what block containing a particular binding symbol, so I don't think it would make sense for inclusion.

There might be value in an upsert fn that directly updates a given fact, though. I've thought about it but haven't tried implementing it yet.

ertugrulcetin commented 12 months ago

I see, thanks for explanation