in reply to Re^2: [CDBI] avoiding set_sql() redefinitions
in thread [CDBI] avoiding set_sql() redefinitions
Yes, you can use DBI directly by getting the database handle. This can be done by calling class->db_Main(). You can use it exactly like you would use regular DBI.
sub foo { my $class = shift; my $dbh = $class->db_Main(); my $sth = $dbh->prepare_cached("SELECT ..."); $sth->execute(...); #... usual DBI stuff }
If you then want your return to be objects from the data you retrieved, you may want to look into sth_to_objects() or construct() methods.
|
|---|