use MooseX::Declare;
class SQL::Translator::Object::Constraint {
- use MooseX::Types::Moose qw(HashRef Str);
+ use MooseX::Types::Moose qw(HashRef Maybe Str);
use MooseX::AttributeHelpers;
use SQL::Translator::Types qw(Column);
extends 'SQL::Translator::Object';
has 'name' => (
is => 'rw',
- isa => Str,
+ isa => Maybe[Str],
required => 1
);
provides => {
exists => 'exists_column',
keys => 'column_ids',
+ values => 'get_columns',
get => 'get_column',
},
curries => {
isa => Str,
required => 1
);
+
+ method get_fields { return $self->get_columns }
+ method fields { return $self->column_ids }
}