X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FDB2.pm;h=ff6cb36b105bfa4904ef23a8766353e8892332c6;hb=900628605efdbced5dcfdbbab0022b204aa93e14;hp=ba9ddafa2a20cf63c14323e2321e7a55913f8540;hpb=a6900c9127d90a9bec26228a16f68a11cc13fb1d;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm b/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm index ba9ddaf..ff6cb36 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm @@ -8,12 +8,12 @@ use base qw/ /; use mro 'c3'; -use List::MoreUtils 'any'; +use List::Util 'any'; use namespace::clean; use DBIx::Class::Schema::Loader::Table (); -our $VERSION = '0.07039'; +our $VERSION = '0.07044'; =head1 NAME @@ -75,7 +75,7 @@ EOF my ($col, $constname, $seq) = @$row; push(@{$keydata{$constname}}, [ $seq, $self->_lc($col) ]); } - foreach my $keyname (keys %keydata) { + foreach my $keyname (sort keys %keydata) { my @ordered_cols = map { $_->[1] } sort { $a->[0] <=> $b->[0] } @{$keydata{$keyname}}; push(@uniqs, [ $keyname => \@ordered_cols ]); @@ -104,6 +104,8 @@ JOIN syscat.references sr AND tc.tabname = sr.tabname JOIN syscat.keycoluse rkcu ON sr.refkeyname = rkcu.constname + AND sr.reftabschema = rkcu.tabschema + AND sr.reftabname = rkcu.tabname AND kcu.colseq = rkcu.colseq WHERE tc.tabschema = ? AND tc.tabname = ? @@ -162,6 +164,14 @@ sub _dbh_tables { return $self->dbh->tables($schema ? { TABLE_SCHEM => $schema, TABLE_NAME => '%' } : undef); } +sub _dbh_table_info { + my $self = shift; + + local $^W = 0; # shut up undef warning from DBD::DB2 + + $self->next::method(@_); +} + sub _columns_info_for { my $self = shift; my ($table) = @_; @@ -249,9 +259,9 @@ EOF L, L, L -=head1 AUTHOR +=head1 AUTHORS -See L and L. +See L. =head1 LICENSE