/usr/local/perl/lib/site_perl/5.8.5/DB/Introspector/Base/Index.pm


NAME

DB::Introspector::Base::Index


SYNOPSIS

 use DB::Introspector;
 my $introspector = DB::Introspector->get_instance($dbh);
 my $table = $introspector->find_table('users');
 foreach my $index ($table->indexes) {
    print "INDEX (". join(",", $index->column_names). ")\n";
 }
     
=head1 DESCRIPTION

DB::Introspector::Base::Index is a class that represents a table's index.


ABSTRACT METHODS

$index->column_names

Returns: an array (@) of column names in the order in which the index was declared.


METHODS

DB::Introspector::Base::Index->new($table, $is_unique);

Params:

$table - a DB::Introspector::Base::Table instance

$is_unique - a boolean describing whether or not this index is a unique index (meaning it requires all of its elemets to be unique.

Returns: an instance of a DB::Introspector::Base::Index

$index->table

Returns: The table that this index is apart of.

$index->unique

Returns: whether or not this is a unique index


SEE ALSO

the DB::Introspector manpage

the DB::Introspector::Base::Table manpage


AUTHOR

Masahji C. Stewart


COPYRIGHT

The DB::Introspector::Base::Index module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

 /usr/local/perl/lib/site_perl/5.8.5/DB/Introspector/Base/Index.pm