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


NAME

DB::Introspector::Base::FunctionalIndex


EXTENDS

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

Represents a functional index of a table. This implementation is a very barebones quick fix that still fits into the DB::Introspector::Base framework.

In the future, I would like to create a collection of datastructures that can generically describe a functional index expression, which could then be returned by the FunctionIndex package. This would require that driver implementations be able to parse expressions.


ABSTRACT METHODS

$index->column_names

Returns: an array (@) of column names in the order in which the index was declared. If the column name is an expression then it is the expression as it is declared in the database.

$index->is_expression($column_name)

Returns: 1 if this column is an expression and 0 otherwise.


SEE ALSO

the DB::Introspector::Base::Index manpage


AUTHOR

Masahji C. Stewart


COPYRIGHT

The DB::Introspector::Base::FunctionalIndex 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/FunctionalIndex.pm