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";
}
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
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.