mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #24634 from kamipo/arel_visitors_definitions_was_removed
Define `arel_visitor` method on all adapters
This commit is contained in:
commit
406a2380b8
4 changed files with 13 additions and 1 deletions
|
@ -149,7 +149,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def arel_visitor # :nodoc:
|
||||
(Arel::Visitors::VISITORS[@config[:adapter]] || Arel::Visitors::ToSql).new(self)
|
||||
Arel::Visitors::ToSql.new(self)
|
||||
end
|
||||
|
||||
def valid_type?(type)
|
||||
|
|
|
@ -24,6 +24,10 @@ module ActiveRecord
|
|||
MySQL::SchemaCreation.new(self)
|
||||
end
|
||||
|
||||
def arel_visitor # :nodoc:
|
||||
Arel::Visitors::MySQL.new(self)
|
||||
end
|
||||
|
||||
##
|
||||
# :singleton-method:
|
||||
# By default, the Mysql2Adapter will consider all columns of type <tt>tinyint(1)</tt>
|
||||
|
|
|
@ -125,6 +125,10 @@ module ActiveRecord
|
|||
PostgreSQL::SchemaCreation.new self
|
||||
end
|
||||
|
||||
def arel_visitor # :nodoc:
|
||||
Arel::Visitors::PostgreSQL.new(self)
|
||||
end
|
||||
|
||||
# Returns true, since this connection adapter supports prepared statement
|
||||
# caching.
|
||||
def supports_statement_cache?
|
||||
|
|
|
@ -80,6 +80,10 @@ module ActiveRecord
|
|||
SQLite3::SchemaCreation.new self
|
||||
end
|
||||
|
||||
def arel_visitor # :nodoc:
|
||||
Arel::Visitors::SQLite.new(self)
|
||||
end
|
||||
|
||||
def initialize(connection, logger, connection_options, config)
|
||||
super(connection, logger, config)
|
||||
|
||||
|
|
Loading…
Reference in a new issue