diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-18 13:27:03 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-18 13:36:36 +0200 |
commit | 644dd0be32f8024f8d4be2fd0ee394d8d12d61bd (patch) | |
tree | c83d6be3d3e7860396fa5cfe57e5682a94e51d35 /activerecord | |
parent | 132185b0d375334c6a7384f06420ed3e2828a9b3 (diff) | |
download | rails-644dd0be32f8024f8d4be2fd0ee394d8d12d61bd.tar.gz rails-644dd0be32f8024f8d4be2fd0ee394d8d12d61bd.tar.bz2 rails-644dd0be32f8024f8d4be2fd0ee394d8d12d61bd.zip |
Improve documentation for AbstractAdapter#add_limit_offset!
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb | 8 |
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 |