Flowdock
method

add_limit_offset!

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveRecord::ConnectionAdapters::DatabaseStatements

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.1.0) is shown here.

add_limit_offset!(sql, options) public

Appends LIMIT and OFFSET options to an SQL statement, or some SQL fragment that has the same semantics as LIMIT and OFFSET.

options must be a Hash which contains a :limit option and an :offset option.

This method modifies the sql parameter.

This method is deprecated!! Stop using it!

Examples
add_limit_offset!('SELECT * FROM suppliers', {:limit => 10, :offset => 50})

generates

SELECT * FROM suppliers LIMIT 10 OFFSET 50
Show source
Register or log in to add new notes.