X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=DBSchema%2FDBD.pm;h=43aaa64030d31c46a42480c9dc679eb2271a373a;hb=28f32ee894c7818c2666fdb5b5b5e501a86776b6;hp=898d0aa6302b5f1e8fad9214db7aec0fe5670cfa;hpb=400aa157abf08369aef787b093814ab9f4523015;p=DBIx-DBSchema.git diff --git a/DBSchema/DBD.pm b/DBSchema/DBD.pm index 898d0aa..43aaa64 100644 --- a/DBSchema/DBD.pm +++ b/DBSchema/DBD.pm @@ -259,6 +259,21 @@ sub column_value_needs_quoting { } +sub tables { + my ($proto, $dbh, $sth) = @_; + + my $db_catalog = $proto->default_db_catalog; + my $db_schema = $proto->default_db_schema; + + $sth ||= $dbh->table_info($db_catalog, $db_schema, '', 'TABLE') + or die $dbh->errstr; + + #map { $_->{TABLE_NAME} } grep { $_->{TABLE_TYPE} eq 'TABLE' } + # @{ $sth->fetchall_arrayref({ TABLE_NAME=>1, TABLE_TYPE=>1}) }; + map { $_->[0] } grep { $_->[1] =~ /^TABLE$/i } + @{ $sth->fetchall_arrayref([2,3]) }; +} + =back =head1 TYPE MAPPING @@ -286,7 +301,7 @@ Ivan Kohler =head1 COPYRIGHT Copyright (c) 2000-2005 Ivan Kohler -Copyright (c) 2007-2013 Freeside Internet Services, Inc. +Copyright (c) 2007-2017 Freeside Internet Services, Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.