Skip to content

Commit

Permalink
Merge pull request rails#412 from yui-knk/remove_not_used_codes
Browse files Browse the repository at this point in the history
Delete not used codes
  • Loading branch information
sgrif committed Feb 6, 2016
2 parents 63ea665 + 62e3596 commit 1483482
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions lib/arel/visitors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,5 @@

module Arel
module Visitors
VISITORS = {
'postgresql' => Arel::Visitors::PostgreSQL,
'mysql' => Arel::Visitors::MySQL,
'mysql2' => Arel::Visitors::MySQL,
'mssql' => Arel::Visitors::MSSQL,
'sqlserver' => Arel::Visitors::MSSQL,
'oracle_enhanced' => Arel::Visitors::Oracle,
'sqlite' => Arel::Visitors::SQLite,
'sqlite3' => Arel::Visitors::SQLite,
'ibm_db' => Arel::Visitors::IBM_DB,
'informix' => Arel::Visitors::Informix,
}

ENGINE_VISITORS = Hash.new do |hash, engine|
pool = engine.connection_pool
adapter = pool.spec.config[:adapter]
hash[engine] = (VISITORS[adapter] || Visitors::ToSql).new(engine)
end

def self.visitor_for engine
ENGINE_VISITORS[engine]
end
class << self; alias :for :visitor_for; end
end
end

0 comments on commit 1483482

Please sign in to comment.