aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 21:56:50 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 21:56:50 +0000
commitee8d110068e958b400987b5f224e14e292fd0558 (patch)
treea94385c7b5cddb6704d2e6d53aa8097bd5363198 /activerecord/lib/active_record/connection_adapters/db2_adapter.rb
parent9fe45f31ebeb772fdd1bc850c12cd465463e2ef7 (diff)
downloadrails-ee8d110068e958b400987b5f224e14e292fd0558.tar.gz
rails-ee8d110068e958b400987b5f224e14e292fd0558.tar.bz2
rails-ee8d110068e958b400987b5f224e14e292fd0558.zip
Added adapter independent limit clause as a two-element array with the first being the limit, the second being the offset #795 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/db2_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/db2_adapter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
index d5bb1147f9..b712971609 100644
--- a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
@@ -89,7 +89,11 @@ begin
s.gsub(/'/, "''") # ' (for ruby-mode)
end
- def add_limit!(sql, limit)
+ def add_limit_with_offset!(sql, limit, offset)
+ raise ArgumentError, 'add_limit_with_offset! not implemented'
+ end
+
+ def add_limit_without_offset!(sql, limit)
sql << " FETCH FIRST #{limit} ROWS ONLY"
end