Sha256: 036e4cff1037ede6c31b7ce45c7734a3d812610a8787b3c0d6884e02ce5e9d25

Contents?: true

Size: 972 Bytes

Versions: 7

Compression:

Stored size: 972 Bytes

Contents

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

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

def connection_string
  "#{connection_SPEC['username']}/#{connection_SPEC['password']}@#{connection_SPEC['host']}"
end

# Adapter config setup in locals/database_connections.rb
spec = CompositePrimaryKeys::ConnectionSpec[:oracle]
ActiveRecord::Base.establish_connection(spec)

# 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

7 entries across 7 versions & 1 rubygems

Version Path
composite_primary_keys-3.0.9 test/connections/native_oracle_enhanced/connection.rb
composite_primary_keys-3.0.8 test/connections/native_oracle_enhanced/connection.rb
composite_primary_keys-3.0.7 test/connections/native_oracle_enhanced/connection.rb
composite_primary_keys-3.0.4 test/connections/native_oracle_enhanced/connection.rb
composite_primary_keys-3.0.3 test/connections/native_oracle_enhanced/connection.rb
composite_primary_keys-3.0.0.b3 test/connections/native_oracle_enhanced/connection.rb
composite_primary_keys-3.0.0.b2 test/connections/native_oracle_enhanced/connection.rb