Sha256: 1b57ab9754cd95b05b8f826e9cdc18b8ba5657326f4d630606766678e251ff08

Contents?: true

Size: 513 Bytes

Versions: 1

Compression:

Stored size: 513 Bytes

Contents

require 'activerecord-jdbc-adapter'
require 'jdbc-vertica'

class JdbcTest < ActiveRecord::Base
end

$username = 'dbadmin'
$password = '********'
$host = 'veritica.jp'

Jdbc::Vertica.load_driver
ActiveRecord::Base.establish_connection adapter: 'jdbc',
  driver: 'com.vertica.jdbc.Driver',
  url: "jdbc:vertica://#{$host}:5433/",
  username:  $username,
  password: $password,
  database: 'vmain',
  schema_search_path: 'sandbox'
ActiveRecord::Base.connection.execute "SET search_path TO sandbox;"

p JdbcTest.all

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jdbc-vertica-0.0.1 example/activerecord.rb