
DBIx::Class::Storage::DBI - DBI storage handler


This class represents the connection to the database

Executes the sql statements given as a listref on every db connect.
Causes SQL trace information to be emitted on debugfh filehandle (or STDERR if debugfh has not specifically been set).
Sets or retrieves the filehandle used for trace/debug output.
This should be an IO::Handle compatible object (only the print method is used).
Initially set to be STDERR - although see information on the DBIX_CLASS_STORAGE_DBI_DEBUG environment variable.
Sets a callback to be executed each time a statement is run; takes a sub reference. Overrides debugfh. Callback is executed as $sub->($op, $info) where $op is SELECT/INSERT/UPDATE/DELETE and $info is what would normally be printed.
Returns the dbh - a data base handle of class DBI.
Calls begin_work on the current dbh.
See DBIx::Class::Schema for the txn_do() method, which allows for an entire code block to be executed transactionally.
Issues a commit against the current dbh.
Issues a rollback against the current dbh. A nested rollback will throw a DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION exception, which allows the rollback to propagate to the outermost transaction.
Returns database type info for a given table columns.

If DBIX_CLASS_STORAGE_DBI_DEBUG is set then SQL trace information is produced (as when the debug method is set).
If the value is of the form 1=/path/name then the trace output is written to the file /path/name.
This environment variable is checked when the storage object is first created (when you call connect on your schema). So, run-time changes to this environment variable will not take effect unless you also re-connect on your schema.

Matt S. Trout <mst@shadowcatsystems.co.uk>
Andy Grundman <andy@hybridized.org>

You may distribute this code under the same terms as Perl itself.