X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FDBI%2FOracle.pm;h=fadb522b674c1881c74a872f10bec381a4b5f285;hb=f769b7e83b290b2500a1860d35527ff41df64d99;hp=590519f21e580bb74d438e5c9151796bbd8c6fe5;hpb=da06ac74ada30aacf656943306679a28605ad5c8;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Parser/DBI/Oracle.pm b/lib/SQL/Translator/Parser/DBI/Oracle.pm index 590519f..fadb522 100644 --- a/lib/SQL/Translator/Parser/DBI/Oracle.pm +++ b/lib/SQL/Translator/Parser/DBI/Oracle.pm @@ -1,25 +1,5 @@ package SQL::Translator::Parser::DBI::Oracle; -# ------------------------------------------------------------------- -# $Id: Oracle.pm 1440 2009-01-17 16:31:57Z jawnsy $ -# ------------------------------------------------------------------- -# Copyright (C) 2006-2009 SQLFairy Authors -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; version 2. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA -# ------------------------------------------------------------------- - =head1 NAME SQL::Translator::Parser::DBI::Oracle - parser for DBD::Oracle @@ -42,18 +22,17 @@ use SQL::Translator::Schema::Table; use SQL::Translator::Schema::Field; use SQL::Translator::Schema::Constraint; -our $VERSION = '1.99'; +our $VERSION = '1.62'; -# ------------------------------------------------------------------- sub parse { my ( $tr, $dbh ) = @_; my $schema = $tr->schema; - my $sth = $dbh->table_info(); + my $db_user = uc $tr->parser_args()->{db_user}; + my $sth = $dbh->table_info(undef, $db_user, '%', 'TABLE'); while(my $table_info = $sth->fetchrow_hashref('NAME_uc')) { - next unless ($table_info->{TABLE_TYPE} eq 'TABLE'); next if ($table_info->{TABLE_NAME} =~ /\$/); # create the table @@ -144,9 +123,9 @@ Earl Cahill Ecpan@spack.netE. =head1 ACKNOWLEDGEMENT -Initial revision of this module came almost entirely from work done by +Initial revision of this module came almost entirely from work done by Todd Hepler Ethepler@freeshell.orgE. My changes were -quite minor (ensuring NAME_uc, changing a couple variable names, +quite minor (ensuring NAME_uc, changing a couple variable names, skipping tables with a $ in them). Todd claimed his work to be an almost verbatim copy of