How to apply "where OR condition" and "lt or gt condition" on timestamp fields
Hello,
i woud like to apply 2 conditions:
- OR condition
- if basketItem invoicedOn is newer than basketItem InvoicedOn with 1 hour added to it
Have you any idea ?
9 Replies
@roze789 You should use the
sql
operator on at least one of the two arguments, since these boolean operators expect for at least one side to be a SQL expressionok and how do i add 1 hour to a timestamp field please ?
You can do this:
thank I did work.
I have another question left then I stop 🥲
How do i apply OR condition ?
That should be correct. What's the type error?
If
or
has 0 conditions, it will return undefined, hence why it returns SQL | undefined
. You can do two things here: Add or(...)!
to eliminate the undefined (since in this case, we know there will be conditions) or type filters
as (SQL | undefined)[]
Thank you, used the second option. It works.