I’m happy to announce dbi-dbrc 0.2.0
What is it?
This is a supplement to the dbi module, allowing you to avoid
passwords in your programs that make database connections by using a
special config file. It’s also convenient.
db = DBI::DBRC.new(“mydb”)
db = DBI::DBRC.new(“mydb”,“someUser”)
n = db.max_reconn
n -= 1
sleep db.interval if n > 0
retry if n > 0
# handle database connection error
handle timeout error
This module is (or will be, as soon as I upload it via CVS) included as
part of the ruby-dbi package and can be installed using the "-with=dbrc"
option when you install ruby-dbi. I’ve also setup a separate page for
those times when it gets out of sync with the ruby-dbi release and/or
you want to download it separately.
You can find the home page at http://ruby-miscutils.sourceforge.net