Sha256: 883e99403c65601b8c1ef3705c0b21110ed8b6b6d4be1b33fe8d7c89d58ea1dc
Contents?: true
Size: 575 Bytes
Versions: 31
Compression:
Stored size: 575 Bytes
Contents
require "directive_record/query/sql" require "directive_record/query/mysql" require "directive_record/query/big_query" module DirectiveRecord module Query def self.new(klass, connection = nil) class_for((connection || klass.connection).class.name.downcase).new(klass) end private def self.class_for(connection_class) if connection_class.include?("mysql") MySQL elsif connection_class.include?("bigquery") BigQuery else raise NotImplementedError, "Connection type not supported" end end end end
Version data entries
31 entries across 31 versions & 1 rubygems