Sha256: 4cf428d7c433c099910236bc73e6c92b350dfcf8cef19b25614598a9e4436df7

Contents?: true

Size: 574 Bytes

Versions: 34

Compression:

Stored size: 574 Bytes

Contents

require 'test/minirunit'
RAILS_CONNECTION_ADAPTERS = ['abstract', 'jdbc']
require 'active_record'

connspec = ActiveRecord::Base.establish_connection(
  :adapter  => 'jdbc',
  :driver   => 'com.mysql.jdbc.Driver',
  :url      => 'jdbc:mysql://localhost:3306/weblog_development',
  :username => 'blog',
  :password => ''
)

connection = ActiveRecord::Base.connection

results = connection.execute "select * from entries"

test_equal results.length, 1

row = results.first
test_equal 'First post', row['title']
test_equal 'First post d00d!', row['content']

puts row.inspect

Version data entries

34 entries across 34 versions & 5 rubygems

Version Path
ActiveRecord-JDBC-0.2.0 test/minirunit/testRawSelect.rb
ActiveRecord-JDBC-0.5 test/minirunit/testRawSelect.rb
ActiveRecord-JDBC-0.3.1 test/minirunit/testRawSelect.rb
ActiveRecord-JDBC-0.3 test/minirunit/testRawSelect.rb
ActiveRecord-JDBC-0.4 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.6 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.7.1 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.8 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.9.1 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.9 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.8.2 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.7 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.7.2 test/minirunit/testRawSelect.rb
activerecord-jdbc-adapter-0.8.1 test/minirunit/testRawSelect.rb