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
I tried this
and got this error
Since 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.
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 $3
I tried this
and got this error
operator does not exist: interval < timestamp with time zone
Since 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.