Sha256: 398c376f0dab4959a450ac0873f8f5ef5406331d3ec128d29442fcfad4f6ff76

Contents?: true

Size: 410 Bytes

Versions: 3

Compression:

Stored size: 410 Bytes

Contents

require 'active_record'

module CsvFastImporter

  # Provide access to database driver/adapter
  class DatabaseConnection

    def self.adapter_name
      @adapter_name ||= base_connection.adapter_name
                                      .downcase
                                      .to_sym
    end

    def self.base_connection
      @base_connection ||= ActiveRecord::Base.connection
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
csv_fast_importer-1.2.0 lib/csv_fast_importer/database_connection.rb
csv_fast_importer-1.1.0 lib/csv_fast_importer/database_connection.rb
csv_fast_importer-1.0.0 lib/csv_fast_importer/database_connection.rb