Translating OQL
select distinct hotel.price
where c.name = “Arlington” )
where exists r in hotel.rooms: r.bed_num = 3;
?{ hotel.price | hotel ? ?{ h | c ? Cities, h ? c.hotels,
?{ r.bed_num = 3 | r ? hotel.rooms } }
Notes:
Almost all OQL features can be mapped directly to monoid comprehensions. The above OQL query finds all hotels in Arlington with at least one room with three beds.