Closed DonDebonair closed 7 years ago
I think your code will work if you replace where*
with where
.
The idea behind -functions is that select
, update
, insert
and delete
all execute the query in the database immediately and in order to prevent this you need to use `select,
update,
insertand
deleteinstead. For
fields,
whereetc. you don't need to do this. So
where` is more of an implementation detail, and the naming is unfortunately a bit misleading.
Replacing where*
with where
works like a charm! Thanks for the help :)
I'm trying to abstract out a where-clause, so I can reuse it between queries.
This is the original code that works:
And here I'm trying to abstract out the date-range filter clause:
This results in a
ClassCastException
:Line 20 here is this part:
(where* query (and (>= :ended_at from)
Can you tell me what I'm doing wrong? To be honest, the documentation is a bit lacking in this regard 😃 So I don't know how
where*
is actually used.