Sha256: be95e0d5e99f4c9303356c1c79dfaa59f5cb435b245a2b61bcd8679a41322bac

Contents?: true

Size: 501 Bytes

Versions: 44

Compression:

Stored size: 501 Bytes

Contents

print "Using native MySQL\n"

def connection_string
  options = {}
  options['u'] = SPEC['username']  if SPEC['username']
  options['p'] = SPEC['password']  if SPEC['password']
  options['S'] = SPEC['sock']      if SPEC['sock']
  options.map { |key, value| "-#{key}#{value}" }.join(" ")
end

# Adapter config setup in test/connections/databases.yml
SPEC = CompositePrimaryKeys::ConnectionSpec['mysql']

def establish_connection
  ActiveRecord::Base.establish_connection(SPEC)
end
establish_connection

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
composite_primary_keys-5.0.9 test/connections/native_mysql/connection.rb
composite_primary_keys-5.0.8 test/connections/native_mysql/connection.rb
composite_primary_keys-5.0.6 test/connections/native_mysql/connection.rb
composite_primary_keys-5.0.5 test/connections/native_mysql/connection.rb