NAME
Oak::IO::DBI - IO routines to exchange data with databases using DBI
DESCRIPTION
This module provides access for exchange data with databases using DBI.
HIERARCHY
PROPERTIES
- datasource
-
DBI datasorce string, used to create the connection. See perldoc DBI for more information.
- username,password,options
-
DBI options. See DBI documentation for more help.
EVENTS
- ev_onConnect
-
When a connection is openned
- ev_onSql
-
When a sql is executed
- ev_onDisconnect
-
When the database is explicitly disconnected (not on DESTROY)
METHODS
- connect
-
Register the connection for this object. Generates an ev_onConnect event.
Could raise the Oak::IO::DBI::Error::ConnectionFailure exception.
- do_sql(SQL)
-
Prepare, executes and test if successfull. Returns the Sth. Generates an ev_onSql event (passes $sql and $sth to the function called).
Could rause the following exceptions: Oak::Filer::DBI::Error::SQLSyntaxError and Oak::Filer::DBI::Error::SQLExecuteError
- quote
-
Quotes a string, using DBI->quote unless empty, else uses "''".
- get_dbh
-
Returns the DBI object.
- disconnect
-
Called by DESTROY, releases the DBI connection. It disconnects. Generates a ev_onDisconnect event.
EXCEPTION HANDLING
- Oak::IO::DBI::Error::SQLExecuteError;
-
This class is raised when the sql has an error while executing
COPYRIGHT
Copyright (c) 2001 Daniel Ruoso <daniel@ruoso.com> and Rodolfo Sikora <rodolfo@trevas.net>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.