aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb31
1 files changed, 2 insertions, 29 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 b3eb23bbb3..ab85171e11 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -1,5 +1,3 @@
-require 'active_support/core_ext/module/deprecation'
-
module ActiveRecord
module ConnectionAdapters # :nodoc:
module DatabaseStatements
@@ -245,31 +243,6 @@ module ActiveRecord
# done if the transaction block raises an exception or returns false.
def rollback_db_transaction() end
- # 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
- # and an +:offset+ option.
- #
- # This method *modifies* the +sql+ parameter.
- #
- # This method is deprecated!! Stop using it!
- #
- # ===== Examples
- # add_limit_offset!('SELECT * FROM suppliers', {:limit => 10, :offset => 50})
- # generates
- # SELECT * FROM suppliers LIMIT 10 OFFSET 50
- def add_limit_offset!(sql, options)
- if limit = options[:limit]
- sql << " LIMIT #{sanitize_limit(limit)}"
- end
- if offset = options[:offset]
- sql << " OFFSET #{offset.to_i}"
- end
- sql
- end
- deprecate :add_limit_offset!
-
def default_sequence_name(table, column)
nil
end
@@ -308,10 +281,10 @@ module ActiveRecord
# Sanitizes the given LIMIT parameter in order to prevent SQL injection.
#
# The +limit+ may be anything that can evaluate to a string via #to_s. It
- # should look like an integer, or a comma-delimited list of integers, or
+ # should look like an integer, or a comma-delimited list of integers, or
# an Arel SQL literal.
#
- # Returns Integer and Arel::Nodes::SqlLiteral limits as is.
+ # Returns Integer and Arel::Nodes::SqlLiteral limits as is.
# Returns the sanitized limit parameter, either as an integer, or as a
# string which contains a comma-delimited list of integers.
def sanitize_limit(limit)