Mysql DBD and DBI -- affected_rows

V

Ven Pa

I posted this on c.l.ruby a few hours back, but don't see it here. I
registered and and posting here. So, bear with me if this has been
discussed before. I have been writing a few classes in ruby based on DBI
(version 0.1.0). I have only used Mysql driver so far. I have a few
questions related to DBI.

1) The DBI StatementHandle class seems to be encapsulating a cursor. Or
is
it just me? For example, there is no way to repeatedly use a
StatementHandle
object with different SQL statements.

2) There is no way to get affected_rows on a queries (e.g. update,
delete,
etc.) that don't return results. There is a affected_rows on
DatabaseHandle
but not on StatementHandle.

3) There is a StatementHandle#fetch_array method, but no
StatementHandle#bind_array method. bind_array method would be useful
when
inserting/updating more than one row at a time.

These are really not questions, but I am just trying to find out if I
missed
something.

-Venkat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top