aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-01-13 09:49:16 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-01-15 22:44:27 +0900
commit8056fe0d964a8d0add46d4b545e396e5fadfcbe3 (patch)
treeded039c8f2e4096b347a825089e96152feb6794a /activerecord/lib
parent862c78b26f83cea7d07ee9c6f6ea0ba5ecfb8e22 (diff)
downloadrails-8056fe0d964a8d0add46d4b545e396e5fadfcbe3.tar.gz
rails-8056fe0d964a8d0add46d4b545e396e5fadfcbe3.tar.bz2
rails-8056fe0d964a8d0add46d4b545e396e5fadfcbe3.zip
Deprecate `connection.visitor = ...` which is not released internal usage
This attr writer was introduced at 7db90aa, but the usage is already removed at bd2f5c0 before v3.2.0.rc1 is released. If we'd like to customize the visitor in the connection, `arel_visitor` which is implemented in all adapters (mysql2, postgresql, sqlite3, oracle-enhanced, sqlserver) could be used for the purpose #23515.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_adapter.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index 0d2d66f919..0065d7c349 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -6,6 +6,7 @@ require "active_record/connection_adapters/sql_type_metadata"
require "active_record/connection_adapters/abstract/schema_dumper"
require "active_record/connection_adapters/abstract/schema_creation"
require "active_support/concurrency/load_interlock_aware_monitor"
+require "active_support/deprecation"
require "arel/collectors/bind"
require "arel/collectors/composite"
require "arel/collectors/sql_string"
@@ -76,8 +77,11 @@ module ActiveRecord
SIMPLE_INT = /\A\d+\z/
- attr_accessor :visitor, :pool, :prevent_writes
- attr_reader :schema_cache, :owner, :logger, :prepared_statements, :lock
+ attr_writer :visitor
+ deprecate :visitor=
+
+ attr_accessor :pool, :prevent_writes
+ attr_reader :schema_cache, :visitor, :owner, :logger, :prepared_statements, :lock
alias :in_use? :owner
set_callback :checkin, :after, :enable_lazy_transactions!