Hi there! I need to check whether two dates overla...
# prisma-client
m
Hi there! I need to check whether two dates overlap. Previously (with TypeORM) I used a raw query like so:
Copy code
qb.andWhere(
            '("Appointment"."start_date", "Appointment"."end_date") OVERLAPS (:startDate, :endDate)',
            { startDate: startDate, endDate: endDate }
          );
Is there any way to make use of OVERLAPS in prisma without having to build the whole query yourself?
r
@Marco Schweizer 👋 Unfortunately you would need to use a raw query for this using
prisma.$queryRaw
. We have a request for the same here so it would be great if you could add a 👍 so that we know the priority for this 🙂
m
Hi Ryan, Thanks for the input! I added my 👍 to the request 🙂
👍 1