aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-09-05 23:45:52 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-09-05 23:45:52 +0900
commite0a1235f7df0fa193c7e299a5adee88db246b44f (patch)
tree673a78a75974803b2432266b39db6b4c4f236f42 /activerecord/lib/active_record/connection_adapters/abstract
parentbd932f5d2244185527c57d81ee7b6a7762560ab5 (diff)
downloadrails-e0a1235f7df0fa193c7e299a5adee88db246b44f.tar.gz
rails-e0a1235f7df0fa193c7e299a5adee88db246b44f.tar.bz2
rails-e0a1235f7df0fa193c7e299a5adee88db246b44f.zip
Deprecate most methods which were never used in `DatabaseLimits`
`DatabaseLimits` and those methods were introduced at 3809c80, but most methods were never used and never tested from the beginning (except `table_alias_length`, `index_name_length`, and `in_clause_length` (since 66c09372)). There is no reason to maintain unused those methods for about 8 years.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb
index 7a9e7add24..ad148efcfe 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "active_support/deprecation"
+
module ActiveRecord
module ConnectionAdapters # :nodoc:
module DatabaseLimits
@@ -12,11 +14,13 @@ module ActiveRecord
def column_name_length
64
end
+ deprecate :column_name_length
# Returns the maximum length of a table name.
def table_name_length
64
end
+ deprecate :table_name_length
# Returns the maximum allowed length for an index name. This
# limit is enforced by \Rails and is less than or equal to
@@ -36,16 +40,19 @@ module ActiveRecord
def columns_per_table
1024
end
+ deprecate :columns_per_table
# Returns the maximum number of indexes per table.
def indexes_per_table
16
end
+ deprecate :indexes_per_table
# Returns the maximum number of columns in a multicolumn index.
def columns_per_multicolumn_index
16
end
+ deprecate :columns_per_multicolumn_index
# Returns the maximum number of elements in an IN (x,y,z) clause.
# +nil+ means no limit.
@@ -57,11 +64,13 @@ module ActiveRecord
def sql_query_length
1048575
end
+ deprecate :sql_query_length
# Returns maximum number of joins in a single query.
def joins_per_query
256
end
+ deprecate :joins_per_query
end
end
end