use MooseX::MultiMethods;
multi method fields(Str $columns) {
+ $self->clear_columns;
my @columns = split /\s*,\s*/, $columns;
for my $column (@columns) {
die "Column '$column' does not exist!" unless $self->table->exists_column($column);
}
multi method fields(ArrayRef $columns) {
+ $self->clear_columns;
for my $column (@$columns) {
die "Column '$column' does not exist!" unless $self->table->exists_column($column);
$self->add_column($self->table->get_column($column));
get_columns => 'values',
get_column => 'get',
add_column => 'set',
+ clear_columns => 'clear',
},
default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash },
);
get_columns => 'values',
get_column => 'get',
add_column => 'set',
+ clear_columns => 'clear',
},
default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash },
);
get_column => 'get',
add_column => 'set',
remove_column => 'delete',
+ clear_columns => 'clear',
},
default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash },
);
get_columns => 'values',
get_column => 'get',
add_column => 'set',
+ clear_columns => 'clear',
},
default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash },
);