From: Graham Barr Date: Fri, 9 Oct 2009 05:15:28 +0000 (-0500) Subject: Add parse method for DBI parser X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=984c6a77c1c71ba6fe89c161418991a1e6ffd72f;p=dbsrgits%2FSQL-Translator-2.0-ish.git Add parse method for DBI parser --- diff --git a/lib/SQL/Translator/Parser/DBI.pm b/lib/SQL/Translator/Parser/DBI.pm index 42550d0..a93ad3e 100644 --- a/lib/SQL/Translator/Parser/DBI.pm +++ b/lib/SQL/Translator/Parser/DBI.pm @@ -5,6 +5,7 @@ role SQL::Translator::Parser::DBI { use DBI::Const::GetInfoReturn; use MooseX::Types::Moose qw(HashRef Maybe Str); + use MooseX::MultiMethods; use SQL::Translator::Object::Column; use SQL::Translator::Object::ForeignKey; @@ -144,4 +145,10 @@ role SQL::Translator::Parser::DBI { $index->add_column($table->get_column($_)) for @index_cols; $table->add_index($index); } + + multi method parse(Schema $data) { $data } + + multi method parse(Any $) { + $self->_add_tables($self->schema); + } }