2 class SQL::Translator::Object::Index extends SQL::Translator::Object {
3 use MooseX::Types::Moose qw(HashRef Str);
4 use MooseX::MultiMethods;
5 use SQL::Translator::Types qw(Column Table);
22 isa => HashRef[Column],
24 exists_column => 'exists',
26 get_columns => 'values',
29 clear_columns => 'clear',
31 default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash },
41 around add_column(Column $column) { $self->$orig($column->name, $column) }
43 method is_valid { $self->table && scalar $self->get_columns ? 1 : undef }