要执行范围查询,我们遵循类似于以下语法的内容 - :
oms[:order_items].where(:internal_sla => 3..5) results in this query
=> #<Sequel::Mysql2::Dataset: "SELECT * FROM `order_items` WHERE ((`internal_sla` >= 3) AND (`internal_sla` <= 5))">
但是我怎样才能改变活动记录查询给我这样的东西=>select internal_sla from order_items where (internal_sla<=3 and internal_sla>=0) OR (internal_sla<=15 and internal_sla>=10)