[#4766] Wiki — "Glen Stampoultzis" <trinexus@...>

21 messages 2000/09/04
[#4768] RE: Wiki — "NAKAMURA, Hiroshi" <nahi@...> 2000/09/04

Hi, Glen,

[#4783] Re: Wiki — Masatoshi SEKI <m_seki@...> 2000/09/04

[#4785] Re: Wiki — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/09/05

Howdy,

[#4883] Re-binding a block — Dave Thomas <Dave@...>

16 messages 2000/09/12

[#4930] Perl 6 rumblings -- RFC 225 (v1) Data: Superpositions — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/09/15

[#4936] Ruby Book Eng. translation editor's questions — Jon Babcock <jon@...>

20 messages 2000/09/16

[#5045] Proposal: Add constants to Math — Robert Feldt <feldt@...>

15 messages 2000/09/21

[#5077] Crazy idea? infix method calls — hal9000@...

This is a generalization of the "in" operator idea which I

17 messages 2000/09/22

[#5157] Compile Problem with 1.6.1 — Scott Billings <aerogems@...>

When I try to compile Ruby 1.6.1, I get the following error:

15 messages 2000/09/27

[ruby-talk:5075] Re: RDBMS interface for Ruby?

From: Yasushi Shoji <yashi@...>
Date: 2000-09-22 22:05:40 UTC
List: ruby-talk #5075
At Sat, 23 Sep 2000 04:40:02 +0900,
philipd9@my-deja.com wrote:
> 
> Has anyone written an interface to the more common relational database
> systems? I am thinking of something similar to Perl's DBI + DBD::Oracle.
> 
> I know I can just open a pipe to sqlplus, but that is no better than
> using the Korn shell!

i thought that, too.  but someone told me that Ruby doesn't even need
interface library if all DBD has same protocol(method names).

# i don't know how well thouse dbd is organized, though... ;p

it's been a while since i checked Perl's DBI, so I might be wrong
here. but, even you are usign DBI, you gotta have DBD access for some
specific functions, right?

under Ruby, because you have to specify the database you want,
creating an instance of db object gotta be a DBD specific task.  but,
once you got a db object you can treate them all same.

btw, library for oracle is already out there.  check RAA.
--
         yashi


# it will NOT work.

def DBI.new(:database, *arg)
  case
  when :oracle
    require 'oracle'
    Oracle.connect(arg)
  when :postgres
    require 'postgres
    Postgres.connect(what, ever, you, need)
  when :mysql
    require 'mysql'
    Mysql.connect(arg)
  end
end

db = DBI.new(:oracle, localhost, user, pass)
db.sql('select ....')

# hmm... still worth having DBI?

In This Thread

Prev Next