use Carp::Clan qw/^DBIx::Class/;
use UNIVERSAL::require;
-our $VERSION = '0.04001';
+our $VERSION = '0.04999_02';
=head1 NAME
my ($self, $table) = @_;
my $dbh = $self->schema->storage->dbh;
- my $sth = $dbh->foreign_key_info( '', '', '', '',
- $self->db_schema, $table );
+ my $sth = $dbh->foreign_key_info( '', $self->db_schema, '',
+ '', $self->db_schema, $table );
return [] if !$sth;
my %rels;
my $col_name = $info->{COLUMN_NAME};
$col_name =~ s/^\"(.*)\"$/$1/;
- $result{$col_name} = \%column_info;
+ my $extra_info = $self->_extra_column_info($info) || {};
+
+ $result{$col_name} = { %column_info, %$extra_info };
}
$sth->finish;
};
$column_info{size} = $2;
}
- $result{$columns[$i]} = \%column_info;
+ my $extra_info = $self->_extra_column_info($table, $columns[$i], $sth, $i) || {};
+
+ $result{$columns[$i]} = { %column_info, %$extra_info };
}
$sth->finish;
return \%result;
}
+# Override this in vendor class to return any additional column
+# attributes
+sub _extra_column_info {}
+
=head1 SEE ALSO
L<DBIx::Class::Schema::Loader>