Class: Arel::Visitors::Firebird

Inherits:
ToSql
  • Object
show all
Defined in:
lib/arel/visitors/firebird.rb

Instance Method Summary collapse

Methods included from ArJdbcCompat

#limit_for

Instance Method Details

#visit_Arel_Nodes_SelectStatement(o) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/arel/visitors/firebird.rb', line 6

def visit_Arel_Nodes_SelectStatement o
  [
   o.cores.map { |x| visit_Arel_Nodes_SelectCore x }.join,
   ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?),
   ("ROWS #{limit_for(o.limit)} " if o.limit),
   ("TO #{o.offset} " if o.offset),
  ].compact.join ' '
end