Sha256: 1656ac0422a98d8b24a29d559e0387d5288c3a6859007bcfd4323300e4aef20d

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

require "directive_record/query/sql"
require "directive_record/query/mysql"

module DirectiveRecord
  module Query

    def self.new(klass)
      class_for(klass.connection.class.name.downcase).new(klass)
    end

  private

    def self.class_for(connection_class)
      if connection_class.include?("mysql")
        MySQL
      else
        raise NotImplementedError, "Connection type not supported"
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
directiverecord-0.1.1 lib/directive_record/query.rb