RAA - dbi-dbrc/0.3.0

dbi-dbrc / 0.3.0

Short description: Simple database information interface
Category: Library/Database
Status: Usable
Created: 2002-12-31 15:00:00 GMT
Last update: 2003-10-27 02:50:31 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.3.0.tar.gz?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. :)

Changes for 0.3.0
=================
- Win32 support added. Requires the win32-etc package.
- rd doc separated from source. Moved to 'doc' directory.
- Documentation updates and corrections.
- Minor test suite tweaks for Win32 systems.


Synopsis:

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

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

#or

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.6 (2009-09-11)] [1.1.5 (2009-09-04)] [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