aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongli Lai (Phusion) <hongli@phusion.nl>2008-09-18 13:27:03 +0200
committerHongli Lai (Phusion) <hongli@phusion.nl>2008-09-18 13:36:36 +0200
commit644dd0be32f8024f8d4be2fd0ee394d8d12d61bd (patch)
treec83d6be3d3e7860396fa5cfe57e5682a94e51d35
parent132185b0d375334c6a7384f06420ed3e2828a9b3 (diff)
downloadrails-644dd0be32f8024f8d4be2fd0ee394d8d12d61bd.tar.gz
rails-644dd0be32f8024f8d4be2fd0ee394d8d12d61bd.tar.bz2
rails-644dd0be32f8024f8d4be2fd0ee394d8d12d61bd.zip
Improve documentation for AbstractAdapter#add_limit_offset!
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
index 8fc89de22b..10dc1a81f3 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -98,8 +98,14 @@ module ActiveRecord
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