in reply to Class::DBI and data split multiple tables
package NetworkClass; use base qw(Class::DBI); use DBIx::AnyDBD; our $dbh; sub Db_Main { $dbh ||= DBIx::AnyDBD->connect("dbi:Oracle:network", "user", "pass", {}, "NetWorkDBD"); }
Under the hood you class NetWorkDBD does the serious work; managing your farm of real DB connections.
Simple sql queries are translated into a series of actual SQL queries. Results are aggregated and returned.
You then have the option of direct use of the DBI handle and/or adding a Class::DBI layer.package NetWorkDBD; use SQL::Parser; sub new { my ($dsn, $user, $pass, $atts,$pkg) = @_; # ... } sub selectrow { my $self = shift; my $sql = shift; my @params = @_; # ... }
|
|---|