Sha256: acb80ac564780580a076b9f945a3bf87f75cdb2801d6d5663f1d2f0114bd685b

Contents?: true

Size: 464 Bytes

Versions: 4

Compression:

Stored size: 464 Bytes

Contents

print "Using native Postgresql\n"

def connection_string
  options = Hash.new
  options['U'] = SPEC['username']  if SPEC['username']
  options['h'] = SPEC['host']  if SPEC['host']
  options['p'] = SPEC['port']  if SPEC['port']
  options.map { |key, value| "-#{key} #{value}" }.join(" ")
end

# Adapter config setup in text/connections/databases.yml
SPEC = CompositePrimaryKeys::ConnectionSpec['postgresql']
ActiveRecord::Base.establish_connection(SPEC)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
composite_primary_keys-8.1.8 test/connections/native_postgresql/connection.rb
composite_primary_keys-8.1.7 test/connections/native_postgresql/connection.rb
composite_primary_keys-8.1.6 test/connections/native_postgresql/connection.rb
composite_primary_keys-8.1.5 test/connections/native_postgresql/connection.rb