2 class SQL::Translator::Object::Constraint extends SQL::Translator::Object {
3 use MooseX::Types::Moose qw(ArrayRef Bool HashRef Maybe Str Undef);
4 use MooseX::AttributeHelpers;
5 use SQL::Translator::Types qw(Column Table);
21 metaclass => 'Collection::Hash',
23 isa => HashRef[Column],
25 exists => 'exists_column',
27 values => 'get_columns',
31 default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash },
51 has 'reference_table' => (
56 has 'reference_columns' => (
57 isa => ArrayRef | Undef,
67 around add_column(Column $column) { $self->$orig($column->name, $column) }
69 method get_fields { $self->get_columns }
70 method fields { $self->column_ids }
71 method field_names { $self->column_ids }
73 method reference_fields { $self->reference_columns }