Sha256: 4b17a4342dc88b5b01b3ee4f7e36bb5d9a17ee8190a03f8b07b515e983133ed0
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
module Arel module Visitors class DB2 < Arel::Visitors::ToSql def visit_Arel_Nodes_SelectStatement o add_limit_offset([o.cores.map { |x| visit_Arel_Nodes_SelectCore x }.join, ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?), ].compact.join(' '), o) end def add_limit_offset(sql, o) @connection.replace_limit_offset! sql, o.limit, o.offset && o.offset.value end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activerecord-jdbc-adapter-1.1.0 | lib/arel/visitors/db2.rb |