fix(time-slot): quote the time slot list conditions for MySQL
Merged
CE
7d ago+73+73+01234567890123456789-4-4-0123456789
Problem
TimeSlotService.getTimeSlots (TypeORM) built three SQL fragments with raw double quotes (the employee join condition, the tenant / organization condition on time_slot and time_log, and the createdAt sort) while every other condition goes through p(). MySQL reads double-quoted names as strings, so GET /timesheet/time-slot was a syntax error there.
Fix
Those three fragments go through p().
Tests
New time-slot.service.mysql.spec.ts (isMySQL mocked): no SQL fragment the method builds contains a double quote.
Notes
Not built or run locally.
Summary by cubic
Fixes GET /timesheet/time-slot on MySQL, where three SQL fragments built with raw double quotes caused a syntax error, since MySQL reads double-quoted names as strings.
- Routes the employee join condition, the tenant/organization filter, and the
createdAtsort throughp()like the rest of the query. - Adds
time-slot.service.mysql.spec.ts, which asserts no built SQL fragment contains a double quote when MySQL is the active ORM.