Fork me on GitHub
#datascript
<
2021-02-19
>
oly12:02:15

curious how are people handling optional where clauses ? I am currently passing in search via :in then striping nil from the vector I am building it works. or as another example, if I want to match on product/name how can I match everything if the match is blank ?

:where (remove
            nil?
            ['[?product-entity :product/id ?i]
             '[?product-entity :product/name ?n]
             (when search '[(re-find ?search ?n)])