From: Justin Hunter Date: Tue, 11 Aug 2009 02:51:12 +0000 (-0700) Subject: add compat methods X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5ce86436b0923a217bb0226d28d0a5e5697ec88;p=dbsrgits%2FSQL-Translator-2.0-ish.git add compat methods --- diff --git a/lib/SQL/Translator/Object/Schema.pm b/lib/SQL/Translator/Object/Schema.pm index 8b7084e..0d75b01 100644 --- a/lib/SQL/Translator/Object/Schema.pm +++ b/lib/SQL/Translator/Object/Schema.pm @@ -19,6 +19,7 @@ class SQL::Translator::Object::Schema { provides => { exists => 'exists_table', keys => 'table_ids', + values => 'get_tables', get => 'get_table', }, curries => { @@ -29,7 +30,7 @@ class SQL::Translator::Object::Schema { } } }, - default => sub { {} }, + default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash }, ); has 'views' => ( @@ -39,6 +40,7 @@ class SQL::Translator::Object::Schema { provides => { exists => 'exists_view', keys => 'view_ids', + values => 'get_views', get => 'get_view', }, curries => { @@ -59,6 +61,7 @@ class SQL::Translator::Object::Schema { provides => { exists => 'exists_procedure', keys => 'procedure_ids', + values => 'get_procedures', get => 'get_procedure', }, curries => { @@ -71,4 +74,6 @@ class SQL::Translator::Object::Schema { }, default => sub { {} }, ); + + method is_valid { 1 } }