=cut
sub new {
- my $new = bless({}, ref $_[0] || $_[0]);
+ my $new = {};
+ bless $new, (ref $_[0] || $_[0]);
+
$new->cursor("DBIx::Class::Storage::DBI::Cursor");
$new->transaction_depth(0);
my $sth = $dbh->column_info( undef,$schema, $tab, '%' );
$sth->execute();
- # Some error occured or there is no information:
- if($sth->rows <1) {
- die "column_info returned no rows for $schema, $tab";
- }
-
while ( my $info = $sth->fetchrow_hashref() ){
my %column_info;
$column_info{data_type} = $info->{TYPE_NAME};
$result{$col_name} = \%column_info;
}
};
- return \%result if !$@;
+ return \%result if !$@ && scalar keys %result;
}
my %result;