use SQL::Translator::Utils qw(debug);
-use SQL::Translator::Parser::DBI::MySQL;
-use SQL::Translator::Parser::DBI::SQLServer;
-use SQL::Translator::Parser::DBI::SQLite;
-use SQL::Translator::Parser::DBI::Sybase;
-use SQL::Translator::Parser::DBI::PostgreSQL;
-use SQL::Translator::Parser::DBI::DB2;
-use SQL::Translator::Parser::DBI::Oracle;
-
use base qw(Exporter);
@EXPORT = qw(parse);
my $pkg = "SQL::Translator::Parser::DBI::$driver";
my $sub = $pkg.'::parse';
- #
- # I can't get this to work. I seem to have to have the "use"
- # statements above.
- #
-# $tr->load( $pkg );
+ $tr->load( $pkg );
eval {
no strict 'refs';
use SQL::Translator::Schema::Table;
use SQL::Translator::Schema::Trigger;
use SQL::Translator::Schema::View;
-use SQL::Translator::Schema::Graph;
+
use SQL::Translator::Utils 'parse_list_arg';
use base 'SQL::Translator::Schema::Object';
Returns the schema as an L<SQL::Translator::Schema::Graph> object.
=cut
+ require SQL::Translator::Schema::Graph;
my $self = shift;
+
return SQL::Translator::Schema::Graph->new(
translator => $self->translator );
}
local $Data::Dumper::Maxdepth = 3;
use Log::Log4perl qw(:easy);
-Log::Log4perl->easy_init($ERROR);
+Log::Log4perl->easy_init($ERROR) unless Log::Log4perl->initialized();
use SQL::Translator::Schema::Graph::Node;
use SQL::Translator::Schema::Graph::Edge;
use SQL::Translator::Schema::Graph::Port;