2 class SQL::Translator::Object::Constraint {
3 use MooseX::Types::Moose qw(ArrayRef Bool HashRef Maybe Str Undef);
4 use MooseX::AttributeHelpers;
5 use SQL::Translator::Types qw(Column Table);
6 extends 'SQL::Translator::Object';
22 metaclass => 'Collection::Hash',
24 isa => HashRef[Column],
26 exists => 'exists_column',
28 values => 'get_columns',
32 default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash },
52 has 'reference_table' => (
57 has 'reference_columns' => (
58 isa => ArrayRef | Undef,
63 around add_column(Column $column) { $self->$orig($column->name, $column) }
65 method get_fields { $self->get_columns }
66 method fields { $self->column_ids }
67 method field_names { $self->column_ids }
69 method reference_fields { $self->reference_columns }