can someone share an implementation of the Postgre...
# orm-help
m
can someone share an implementation of the PostgreSQL Daterange please ? I'm having a hard time getting it to works something like this
Copy code
prisma.$queryRaw`
SELECT *
FROM MyTable
WHERE COMPANY_ID = 1
AND "[2020-01-01,2020-12-31]"::daterange @> during
GROUP BY 1
ORDER BY 1 ASC`
something like that where the date range is inclusive of bounds ( aka getting the whole day until 2020-12-31 000000 for say )
n
Hey Mounir 👋 I think this is related to the same issue which is mentioned before in slack. If you can share your model I could try to replicate the issue. It feels to me that maybe the column
during
would need to be casted by referring this stack overflow answer