Parameterized Interval in Where Clause
I'm trying to write a query that uses an interval as a parameter. The SQL looks like this and works fine:
When I try to write it using drizzle, it also works fine if a hard code the interval:
However, it does not work if I try to parameterize the interval like this:
or this:
I get this error
Error: could not determine data type of parameter $3I tried this and got this error
operator does not exist: interval < timestamp with time zoneSince the raw SQL works, I must be missing something in the ORM usage. Any suggestions? I'm running Postgres 16 on neon using drizzle 0.30.7.
3 Replies
Hi dude, did you manage to get this working?
Nope. I had to use the raw SQL.
:c