Version 1.4.2 release
This version mainly contains bug fixes. It also has a small addition to the query API. The changes are:
- Export the
field()
function at theclorm
namespace level. Previously you had to import it fromclorm.orm.core
This works in a similar way to thefield()
function indataclasses
. - Fixed the bug in the
func()
function. This function provides a wrapper for using functions/lambdas within clorm queries. - Added missing
on_core
andon_unsat
callbacks forclorm.clingo.Control.solve()
, which were callbacks introduced in Clingo 5.5. - Fixed non-determinism in
clorm.clingo.Control.solve()
with assumptions. Previously was using aset
object which is not deterministic between python instances so was creating non-determinism when looking at the results of different clingo runs. - Fix bug when specifying a function/lambda in the
select
clause of a query over multiple predicates. The order that the facts were presented to the function/lambda wouldn't always match to the function requirements because of the internal order within the generated query plan. - New feature: while clorm facts are immutable, so cannot be modified within a factbase, the query API now lets you specify how facts can be replaced by a modified version. This can be used to simulate modifying the facts of a factbase.