From 4cd9c9561adcbb8f3267003bd3b01931e457ed6a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 28 Dec 2004 16:26:06 +0000 Subject: 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 --- .../lib/active_record/connection_adapters/abstract_adapter.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb') 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 -- cgit v1.2.3