Module: ActiveRecord::ConnectionHandling

Defined in:
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#oracle_enhanced_connection(config) ⇒ Object

Establishes a connection to the database that’s used by all Active Record objects.



68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/active_record/connection_adapters/oracle_enhanced_adapter.rb', line 68

def oracle_enhanced_connection(config) # :nodoc:
  if config[:emulate_oracle_adapter] == true
    # allows the enhanced adapter to look like the OracleAdapter. Useful to pick up
    # conditionals in the rails activerecord test suite
    require "active_record/connection_adapters/emulation/oracle_adapter"
    ConnectionAdapters::OracleAdapter.new(
      ConnectionAdapters::OracleEnhanced::Connection.create(config), logger, config)
  else
    ConnectionAdapters::OracleEnhancedAdapter.new(
      ConnectionAdapters::OracleEnhanced::Connection.create(config), logger, config)
  end
end