The ottrecql query language
ottrecql is the small query language behind the advanced search on ottrec.ca. It allows you to create custom schedule pages by filtering every City of Ottawa drop-in recreation activity by name, facility, weekday, time, date, and location, combining conditions with and, or, and not. Type a query to search across all schedules.
Combine match functions with logical operators, evaluated against every activity time. Whitespace is insignificant and the schedule timezone (America/Toronto) is implied.
Examples
- Lane swims happening right now.
activity("lane sw") and schdate(today) and time(today @ now) - Weekend skating, excluding figure skating.
activity("skat") and not activity("figure") and time(sa su) - Racquet sports on weekday evenings.
(activity("pickleball") or activity("badminton")) and time(mo we fr @ 18:00-21:00) - Specific or nearby facilities.
facility("splash", "wave") or latlng(45.42620, -75.69205, 5) - Weekday evening skating, excluding adult sessions.
schdate(today) and time(mo tu we th fr @ 16:00-22:00) and activity("skat") and not activity("adult") - Swims on a holiday's schedule.
activity("swim") and schdate(2025-12-25) - Weekend activities starting at any of several times.
time(sa su @ 8:00 9:00 10:00)
Reference
facility("name", ...)- Matches facility names against any of the quoted strings. Matching is fuzzy: each case-insensitive word of the query must be a prefix of a word in the facility name, in the same order, ignoring punctuation. For example,
facility("st laurent")matches "St. Laurent Complex", andfacility("rj kennedy")matches "R.J. Kennedy Community Centre and Arena". activity("name", ...)- Like
facility(), but matches activity names (both normalized and as written in the schedule). Names are normalized to the infinitive form, e.g., "skate" rather than "skating", so prefer prefixes likeactivity("skat")oractivity("lane sw"). time([weekday...|date...] @ [time...|timerange...])- Matches activity weekdays and times. Days and times are each OR'd, and either side can be omitted (along with the
@). Activities with unparseable times are not filtered out. Weekdays are two-letter, three-letter, or full names (mo,mon,monday). Dates areYYYY-MM-DDortoday. Times are 24-hourHH:MM, 12-hourHH:MMam/HH:MMpm(ora/p), ornow. Time ranges are two dash-separated times; an end time earlier than the start extends into the next day. For example:time(now),time(mo tu we th fr),time(sa su @ 12:00),time(mo @ 6:00a-10:00a 6:00p-9:00p). schdate(date)- Matches schedule groups applicable on the date (
YYYY-MM-DDortoday), e.g.,schdate(today)to show current schedules. Groups without a valid date range are not filtered out. latlng(lat, lng, km)- Matches facilities within the radius (kilometers) of the coordinates, e.g.,
latlng(45.42620, -75.69205, 2)matches within 2km of Rideau station. not·and·or·( )- Logical operators, highest to lowest precedence:
(...)grouping,not/!negation,and/&&conjunction,or/||disjunction.
Keep name queries as minimal as possible (e.g., "lane sw" instead of "lane swim") so renamed activities aren't missed.