1 require 'arel/visitors/compat'
5 class HSQLDB < Arel::Visitors::ToSql
6 def visit_Arel_Nodes_SelectStatement o
8 limit_offset(o.cores.map { |x| visit_Arel_Nodes_SelectCore x }.join, o),
9 ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?),
13 def limit_offset sql, o
14 offset = o.offset || 0
17 "SELECT LIMIT #{offset} #{limit_for(limit)} #{bef}"
19 "SELECT LIMIT #{offset} 0 #{bef}"