module ArJdbc::MSSQL::LimitHelpers::SqlServerAddLimitOffset
@private
Public Instance Methods
add_limit_offset!(sql, options)
click to toggle source
@note Only needed with (non-AREL) ActiveRecord *2.3*. @see Arel::Visitors::SQLServer
# File lib/arjdbc/mssql/limit_helpers.rb, line 204 def add_limit_offset!(sql, options) if options[:limit] order = "ORDER BY #{options[:order] || determine_order_clause(sql)}" sql.sub!(/ ORDER BY.*$/i, '') SqlServerReplaceLimitOffset.replace_limit_offset!(sql, options[:limit], options[:offset], order) end end