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
103 104 105 106 107 108 109 |
# File 'lib/arjdbc/mssql/limit_helpers.rb', line 103 def add_limit_offset!(sql, ) if [:limit] order = "ORDER BY #{[:order] || determine_order_clause(sql)}" sql.sub!(/(.*) ORDER BY.*?$/im, '\\1') SqlServerReplaceLimitOffset.replace_limit_offset!(sql, [:limit], [:offset], order) end end |