Module: ArJdbc::MsSQL::LimitHelpers::SqlServer2000AddLimitOffset
- Defined in:
- lib/arjdbc/mssql/limit_helpers.rb
Instance Method Summary collapse
Instance Method Details
#add_limit_offset!(sql, options) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/arjdbc/mssql/limit_helpers.rb', line 52 def add_limit_offset!(sql, ) if [:limit] order = "ORDER BY #{[:order] || determine_order_clause(sql)}" sql.sub!(/ ORDER BY.*$/i, '') SqlServerReplaceLimitOffset.replace_limit_offset!(sql, [:limit], [:offset], order) end end |