Class: Arel::SqlCompiler::HsqldbCompiler

Inherits:
GenericCompiler
  • Object
show all
Defined in:
lib/arel/engines/sql/compilers/hsqldb_compiler.rb

Instance Method Summary collapse

Instance Method Details

#select_sqlObject



4
5
6
7
8
9
10
11
12
# File 'lib/arel/engines/sql/compilers/hsqldb_compiler.rb', line 4

def select_sql
  # HSQLDB needs to add LIMIT in right after SELECT
  query = super
  offset = relation.skipped
  limit = relation.taken
  @engine.connection.add_limit_offset!(query, :limit => limit,
                                       :offset => offset) if offset || limit
  query
end