__PACKAGE__->mk_group_accessors('simple' => qw/_ordered_columns
_columns _primaries _unique_constraints name resultset_attributes
schema from _relationships column_info_from_storage source_info
- source_name _indices/);
+ source_name _indexes/);
__PACKAGE__->mk_group_accessors('component_class' => qw/resultset_class
result_class/);
$new->{_relationships} = { %{$new->{_relationships}||{}} };
$new->{name} ||= "!!NAME NOT SET!!";
$new->{_columns_info_loaded} ||= 0;
- $new->_indices([]) unless $new->_indices;
+ $new->_indexes([]) unless $new->_indexes;
return $new;
}
sub add_index {
my ($self, $idx) = @_;
- push @{ $self->_indices }, $idx;
+ push @{ $self->_indexes }, $idx;
}
-=head2 indicies
+=head2 indexes
-Returns list of secondary (i.e. non unique) indicies created on this table.
+Returns list of secondary (i.e. non unique) indexes created on this table.
=cut
-sub indices {
- return @{ shift->_indices };
+sub indexes {
+ return @{ shift->_indexes };
}
=head2 add_relationship
# ],
);
-my %indices = (
+my %indexes = (
artist => [
{
'fields' => ['name']
}
}
-for my $table_index (keys %indices) {
- for my $expected_index ( @{ $indices{$table_index} } ) {
+for my $table_index (keys %indexes) {
+ for my $expected_index ( @{ $indexes{$table_index} } ) {
ok ( get_index($table_index, $expected_index), "Got a matching index on $table_index table");
}