diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-28 16:26:06 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-28 16:26:06 +0000 |
commit | 4cd9c9561adcbb8f3267003bd3b01931e457ed6a (patch) | |
tree | 86a57e3589dee20e0c6130ba45ff408e082d24a8 /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | |
parent | 37558162664344794cf635bc7e6c976393e0ed17 (diff) | |
download | rails-4cd9c9561adcbb8f3267003bd3b01931e457ed6a.tar.gz rails-4cd9c9561adcbb8f3267003bd3b01931e457ed6a.tar.bz2 rails-4cd9c9561adcbb8f3267003bd3b01931e457ed6a.zip |
Added the possibility for adapters to overwrite add_limit! to implement a different limiting scheme than "LIMIT X" used by MySQL, PostgreSQL, and SQLite.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index a2fb480b8c..1ca6d59977 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -345,6 +345,10 @@ module ActiveRecord # Returns a string of the CREATE TABLE SQL statements for recreating the entire structure of the database. def structure_dump() end + def add_limit!(sql, limit) + sql << " LIMIT #{limit}" + end + protected def log(sql, name, connection, &action) begin |