Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve documentation for AbstractAdapter#add_limit_offset!

  • Loading branch information...
commit 644dd0be32f8024f8d4be2fd0ee394d8d12d61bd 1 parent 132185b
Hongli Lai FooBarWidget authored
8 activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
View
@@ -98,8 +98,14 @@ def add_limit!(sql, options)
add_limit_offset!(sql, options) if options
end
- # Appends +LIMIT+ and +OFFSET+ options to an SQL statement.
+ # 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 (required)
+ # and an +:offset+ option (optional).
+ #
# This method *modifies* the +sql+ parameter.
+ #
# ===== Examples
# add_limit_offset!('SELECT * FROM suppliers', {:limit => 10, :offset => 50})
# generates
Please sign in to comment.
Something went wrong with that request. Please try again.