/usr/local/perl/lib/site_perl/5.8.5/DB/Introspector/Base/FunctionalIndex.pm |
DB::Introspector::Base::FunctionalIndex
DB::Introspector::Base::Index
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.
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.
is_expression($column_name)
Returns: 1 if this column is an expression and 0 otherwise.
the DB::Introspector::Base::Index manpage
Masahji C. Stewart
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 |