Hello,
I need to execute a very complex SQL query for a resource. It’s a Booking
resource, and I want a read action like get_available_slots(date, time, duration)
The SQL is very complex, with several CTEs and window functions. What I want as a result is not an instance of a resource, but a simple list of available times.
Ex:
available_start_time
══════════════════════
09:00:00
09:15:00
09:30:00
09:45:00
10:00:00
10:15:00
10:30:00
10:45:00
11:00:00
11:15:00
11:30:00
11:45:00
12:00:00
14:30:00
...
What is the best approach to achieve this in Ash?
Thanks!