Sha256: 192ebb7524ec95458fec365b041abf2735fabe1f49a782e5521e7a6fca9bdae8
Contents?: true
Size: 648 Bytes
Versions: 2
Compression:
Stored size: 648 Bytes
Contents
require 'test_helper' require 'db/postgres_config' require 'jdbc/postgres' # driver not loaded for plain JDBC Jdbc::Postgres::load_driver url = POSTGRES_CONFIG[:host].dup url << ":#{POSTGRES_CONFIG[:port]}" if POSTGRES_CONFIG[:port] ActiveRecord::Base.establish_connection({ :adapter => 'jdbc', :driver => 'org.postgresql.Driver', :url => "jdbc:postgresql://#{url}/#{POSTGRES_CONFIG[:database]}", :username => POSTGRES_CONFIG[:username], :password => POSTGRES_CONFIG[:password], }) begin result = ActiveRecord::Base.connection.execute("SHOW server_version_num") PG_VERSION = result.first.first[1].to_i rescue PG_VERSION = 0 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activerecord-jdbc-adapter-1.3.0.beta2 | test/db/jdbc_postgres.rb |
activerecord-jdbc-adapter-1.3.0.beta1 | test/db/jdbc_postgres.rb |