Sha256: 711311a99d9eae301ea7a67f51d6ac2b92141f4b0fce1a0420fe4577bf1c33c6
Contents?: true
Size: 815 Bytes
Versions: 13
Compression:
Stored size: 815 Bytes
Contents
ArJdbc::ConnectionMethods.module_eval do # Unless a connection URL (`url: jdbc:oracle:...`) is specified we'll use the # *thin* method to connect to the Oracle DB. # @note Oracle's JDBC driver should be on the class-path. def oracle_connection(config) config[:adapter_spec] ||= ::ArJdbc::Oracle config[:adapter_class] = ActiveRecord::ConnectionAdapters::OracleAdapter unless config.key?(:adapter_class) return jndi_connection(config) if jndi_config?(config) config[:port] ||= 1521 config[:url] ||= "jdbc:oracle:thin:@#{config[:host]}:#{config[:port]}:#{config[:database]}" config[:driver] ||= "oracle.jdbc.driver.OracleDriver" config[:connection_alive_sql] ||= 'SELECT 1 FROM DUAL' jdbc_connection(config) end alias_method :jdbcoracle_connection, :oracle_connection end
Version data entries
13 entries across 13 versions & 1 rubygems