NAME
Class::ReluctantORM::DBH - Database handle base class
DESCRIPTION
This class is used to define an interface for low-level calls to the database handle. In most circumstances, it is a thin wrapper around a DBI database handle. You can use this as a shim to intercept connection calls, manage server timeouts, etc.
Most users will simply use Class::ReluctantORM::DBH::WrapDBI, which directly wraps a DBI database handle. In fact, if you simply pass a DBI database handle to build_class, WrapDBI will be loaded and used for you.
ABSTRACT INTERFACE
$dbh = YourDBHClass->new();
Creates a new, connected database handle. This can be a singleton or pooled connection.
$value = $dbh->get_info($info_id);
A direct passthru to DBI::dbh->get_info. Used to query things like database vendor, version, quote characters, etc.
$dbh->set_handle_error($coderef);
Installs the coderef such that it will be called when a database error occurs. Used to attach a hook to re-throw the error as a Class::ReluctantORM::Exception::SQL::ExecutionError.
$sth = $sbh->prepare($sql_string);
Turn the given SQL string into a DBI statement handle.
$meta_sth = $dbh->column_info($catalog, $schema, $table, $column);
Returns a statement handle with data about the columns in the database. See DBI::column_info.
$dbi_dbh = $cro_dbh->dbi_dbh();
If the CRO DBH is based on DBI, this returns the DBI database handle.
AUTHOR
Clinton Wolfe clwolfe@cpan.org March 2010