From 62e3596db89570b9d48b13c9966d754d5859d0dc Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 6 Feb 2016 16:42:33 +0900 Subject: Delete not used codes These codes were introduced by 03724fb1789198cc394f6e8b69cf9404e03eddd7, and to be not used by 79411322ae225289e1c051f4f68ed84c6349e4a0. --- lib/arel/visitors.rb | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'lib') diff --git a/lib/arel/visitors.rb b/lib/arel/visitors.rb index f492ca2d9d..9bf5170463 100644 --- a/lib/arel/visitors.rb +++ b/lib/arel/visitors.rb @@ -14,28 +14,5 @@ require 'arel/visitors/informix' 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 -- cgit v1.2.3