Module: ArJdbc::MsSQL::LimitHelpers::SqlServerAddLimitOffset
- Defined in:
- lib/arjdbc/mssql/limit_helpers.rb
Instance Method Summary collapse
Instance Method Details
#add_limit_offset!(sql, options) ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/arjdbc/mssql/limit_helpers.rb', line 82 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 |