RAA - dbi-dbrc/0.4.0

dbi-dbrc / 0.4.0

Short description: Simple database information interface
Category: Library/Database
Status: Usable
Created: 2002-12-31 15:00:00 GMT
Last update: 2004-09-05 19:01:33 GMT
Owner: Daniel J. Berger (Projects of this owner)
Homepage: http://ruby-miscutils.sourceforge.net
Download: http://prdownloads.sourceforge.net/ruby-miscutils/dbi-dbrc-0.4.0.zip?download
License: Ruby's
Dependency:
None
Description:

This is a supplement to the dbi module, allowing you to avoid hard-coding
passwords in your programs that make database connections by using a special config file. It's also convenient. :)

Synopsis
========

require 'dbi'
require 'dbi/dbrc'
require 'timeout'

db = DBI::DBRC.new("mydb","someUser")

n = db.max_reconn

begin
timeout(db.time_out){
begin
DBI.connect(db.dsn,db.user,db.passwd)
rescue
n -= 1
sleep db.interval if n > 0
retry if n > 0
# handle database connection error
end
}
rescue TimeoutError
# handle timeout error
end

Versions: [1.1.4 (2008-11-10)] [1.1.3 (2008-07-21)] [1.1.1 (2007-08-02)] [1.1.0 (2005-10-19)] [1.0.1 (2005-10-07)] [1.0.0 (2005-06-15)] [0.5.1 (2005-03-17)] [0.5.0 (2004-10-15)] [0.4.0 (2004-09-05)] [0.3.0 (2003-10-27)]

Edit this project (for project owner)

back to RAA top