2008-07-01から1ヶ月間の記事一覧

SequelはJDBC以外ならいい

今度はSequelを試してみます。まずは、PostgreSQLにpostgres-prでつないでみます。 require 'rubygems' require 'sequel' DB = Sequel.postgres(:database => 'postgres', :user => 'postgres', :password => 'postgres') DB[:user_data].all.each do |user_…

ActiveRecordを試してみた

PostgreSQLにpostgres-prでつないでみる。 require 'rubygems' require 'activerecord' ActiveRecord::Base.establish_connection( :adapter => "postgresql", :host => "localhost", :database => "postgres", :username => "postgres", :password => "post…

RubyのO/Rマッピング

JRubyからPostgreSQLにつなぐにはpostgres-prかJDBCということになりますが、素のpostgres-prやJDBCは使いたくないので、RubyのO/Rマッピングを試します。他にもたくさんあるのでしょうが、代表的なのは以下の3つだそうです。 ActiveRecord http://ar.rubyon…