2 class SQL::Translator::Object::Schema {
3 use MooseX::Types::Moose qw(HashRef Maybe Str);
4 use MooseX::AttributeHelpers;
5 use SQL::Translator::Types qw(Procedure Table View);
6 extends 'SQL::Translator::Object';
16 metaclass => 'Collection::Hash',
18 isa => HashRef[Table],
20 exists => 'exists_table',
27 my ($self, $body, $table) = @_;
28 $self->$body($table->name, $table);
32 default => sub { {} },
36 metaclass => 'Collection::Hash',
40 exists => 'exists_view',
47 my ($self, $body, $view) = @_;
48 $self->$body($view->name, $view);
52 default => sub { {} },
56 metaclass => 'Collection::Hash',
58 isa => HashRef[Procedure],
60 exists => 'exists_procedure',
61 keys => 'procedure_ids',
62 get => 'get_procedure',
66 add_procedure => sub {
67 my ($self, $body, $procedure) = @_;
68 $self->$body($procedure->name, $procedure);
72 default => sub { {} },