Sha256: d58b1fa331abea7952d27e0813c46da8d4fe42e54e182e651f1a4c063274b4c2

Contents?: true

Size: 937 Bytes

Versions: 2

Compression:

Stored size: 937 Bytes

Contents

print "Using native Oracle Enhanced\n"
require 'fileutils'
require 'logger'
require 'adapter_helper/oracle_enhanced'

log_path = File.expand_path(File.join(File.dirname(__FILE__), %w[.. .. .. log]))
FileUtils.mkdir_p log_path
puts "Logging to #{log_path}/debug.log"
ActiveRecord::Base.logger = Logger.new("#{log_path}/debug.log")
ActiveRecord::Base.logger.level = Logger::DEBUG

# Adapter config setup in locals/database_connections.rb
connection_options = AdapterHelper::OracleEnhanced.load_connection_from_env
puts connection_options.inspect
ActiveRecord::Base.establish_connection(connection_options)

# Change default options for Oracle Enhanced adapter
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_dates_by_column_name = true
# Change NLS_DATE_FORMAT to non-default format to verify that all tests should pass
ActiveRecord::Base.connection.execute %q{alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'}

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
tyler-composite_primary_keys-1.1.0 test/connections/native_oracle_enhanced/connection.rb
globe-composite_primary_keys-3.0.1 test/connections/native_oracle_enhanced/connection.rb