Files

Class/Module Index [+]

Quicksearch

ArJdbc::MSSQL::LimitHelpers::SqlServerAddLimitOffset

Public Instance Methods

add_limit_offset!(sql, options) click to toggle source
# File lib/arjdbc/mssql/limit_helpers.rb, line 35
def add_limit_offset!(sql, options)
  if options[:limit]
    order = "ORDER BY #{options[:order] || determine_order_clause(sql)}"
    sql.sub!(/ ORDER BY.*$/, '')
    SqlServerReplaceLimitOffset.replace_limit_offset!(sql, options[:limit], options[:offset], order)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.