Parent

Class Index [+]

Quicksearch

Arel::Visitors::HSQLDB

Public Instance Methods

limit_offset(sql, o) click to toggle source
    # File lib/arel/visitors/hsqldb.rb, line 11
11:       def limit_offset sql, o
12:         offset = o.offset || 0
13:         bef = sql[7..1]
14:         if limit = o.limit
15:           "SELECT LIMIT #{offset} #{limit} #{bef}"
16:         elsif offset > 0
17:           "SELECT LIMIT #{offset} 0 #{bef}"
18:         else
19:           sql
20:         end
21:       end
visit_Arel_Nodes_SelectStatement(o) click to toggle source
   # File lib/arel/visitors/hsqldb.rb, line 4
4:       def visit_Arel_Nodes_SelectStatement o
5:         [
6:           limit_offset(o.cores.map { |x| visit_Arel_Nodes_SelectCore x }.join, o),
7:           ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?),
8:         ].compact.join ' '
9:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.