Fork me on GitHub
#datomic
<
2021-11-06
>
Benjamin17:11:20

Is there a way to have optional arguments in queries? Like something that is either wildcard or some value

thumbnail17:11:17

Depending on your needs you may be able to add or remove clauses conditionally. It's data after all :)

vlaaad17:11:32

Here is how we do it, basically using map queries since those are easy to modify programmatically

potetm19:11:47

It depends on what you’re trying to do, but that’s one way to pass a collection of variable length and get an ord result.

potetm14:11:02

You could just put the whole query behind a conditional.

potetm14:11:14

For that one.

potetm14:11:18

If the :find or :where clauses are more involved, you could use the map query syntax and share elements for each query.

potetm14:11:19

lol that’s what the OP was asking to avoid