Fork me on GitHub
#clara
<
2018-11-15
>
eraserhd19:11:17

dsl seems to parse a thing :exists as an operator, but it's not documented. This sounds like a missing feature we've wanted... is it true?

enn19:11:51

Good catch on the missing docs. There was some discussion on the list when it was implemented, see https://github.com/cerner/clara-rules/issues/130 for details.

đź‘Ť 4
mikerod19:11:03

@eraserhd @enn Yeah, if it isn’t documented seems like it probably should be

mikerod19:11:12

good find on the relevant issue

eraserhd22:11:44

@claudius.nicolae We are going to start heavily using clara-eav, and we have three big pieces of functionality to contribute back.

Joel05:09:16

@eraserhd Curious what you contributed and if there’s support for multiple cardinality in clara-eav.

Joel01:12:32

This doesn’t some how allow you to have: [42 :attr “a”] [42 :attr “b”] Because you can’t insert both of those correct? I’m not understanding how the multiple cardinality could work.

clyfe16:12:41

you can’t insert both of those indeed, upsert replaces the former with the latter

Joel17:12:02

So then I’m not understanding what this does: Many-valued Attributes The shape of the pull result differs for many-valued attributes. clara-eql assumes these attributes have a fact`(->EAV attr-name :db/cardinality :db.cardinality/many)` I guess the eids actually would have to differ for this to work?

clyfe17:12:05

If you use clara insert you can insert multiple eavs with the same :e and :a

thanks3 1
Joel17:12:41

Is there a downside to that? This actually solves some data representation issues I was having.

clyfe17:12:32

Downside: inserted eavs won't be registered in the store's eav-index, and upsert won't retract them in subsequent calls with replacement values

clyfe17:12:10

upsert exists precisely for this reason, to retract eavs that are being replaced

Joel17:12:38

If the EAVs aren’t in the eav-index, is that limiting?

clyfe17:12:30

limiting, in the sense that upsert won't retract them in subsequent calls with replacement values

clyfe17:12:48

otherwise I see no problem

Joel17:12:58

I see, i think for my use case that’s typically OK as my data will be for the most part immutable.

clyfe17:12:18

upsert exists so one can do mutations, if you don't need it great

Joel17:12:01

I can limit upserts to where i need to have some “control flow” in the rules. This is really good.

Joel21:12:10

Is there a way I can use insert yet obtain an eid for it to ensure there is no collision?

Joel21:12:32

I guess UUID would be the expected way.

eraserhd22:11:03

Will you be at Clojure/conj?