Fork me on GitHub
Toyam Cox03:05:35

So, stupid questions, sorry. I have a hard time with a false argument. I don't understand what I missed, but:

dxpb-clj.db=> (crux/q (crux/db  @node) {:find ['e] :where '[[e :pkgname a]] :args [{'a "st"}]})
#{[:st:x86_64:x86_64:cross:false] [:st:x86_64:x86_64-musl:cross:false]}
dxpb-clj.db=> (crux/q (crux/db  @node) {:find ['e] :where '[[e :pkgname a]] :args [{'a "st" 'c false}]})
dxpb-clj.db=> (crux/q (crux/db  @node) {:find ['e] :where '[[e :pkgname a]] :args [{'a "st" 'c true}]})
#{[:st:x86_64:x86_64:cross:false] [:st:x86_64:x86_64-musl:cross:false]}


is it your intention to not have 'c in any clauses? maybe the query response for unbound args is undefined or something

Toyam Cox04:05:15

See the last line of that repl

Toyam Cox04:05:27

When c is true, I get the same result back as when c is not specified


idk i'm staring at it

Toyam Cox04:05:43

I know, me too


perhaps it's just a detail of how the query engine is implemented, what about other values for 'c


my core question is, why pass an arg that isn't used?

Toyam Cox04:05:48

I'm going to use it

Toyam Cox04:05:54

this is the minimal reproducible example


ah, so an interesting find then, sorry i misunderstood your premise

Toyam Cox04:05:03

An interesting find, fortunately I can tell if 'c will be false from other variables not shown, so I don't need 'c, but it'd be nice to understand why my knowledge is broken.

Toyam Cox04:05:55

But I am looking forward to the S3 aspect.... I do need to work with something that'll be in S3 and being able to use it through crux could make life much easier.

Toyam Cox04:05:27

I'll be AFK for a few hours, but interested in docs on using that, and perhaps an answer to my initial query.

Toyam Cox04:05:43

thanks for your help! Hope we get an answer eventually


Morning all 🙂 Thanks @vaelatern for the report, have raised a card for this ( and we'll take a look. At first glance it looks like a bug, but will dive in and have a look at what the query engine's doing Cheers @danvingo too 🙂