DBD::Firebird::TableInfo::Basic(3pm) | User Contributed Perl Documentation | DBD::Firebird::TableInfo::Basic(3pm) |
DBD::Firebird::TableInfo::Basic - A base class for lowest-common denominator Firebird table_info() querying.
# Add support for a hypothetical IB derivative package DBD::Firebird::TableInfo::HypotheticalIBDerivative @ISA = qw(DBD::Firebird::TableInfo::Basic); # What table types are supported? sub supported_types { ('SYSTEM TABLE', 'TABLE', 'VIEW', 'SPECIAL TABLE TYPE'); } sub table_info { my ($self, $dbh, $table, @types) = @_; }
$ti->list_catalogs($dbh); # $dbh->table_info('%', '', '')
Returns a statement handle with an empty result set, as IB does not support the DBI concept of catalogs. (Rule 19a)
$ti->list_schema($dbh); # $dbh->table_info('', '%', '')
Returns a statement handle with an empty result set, as IB does not support the DBI concept of schema. (Rule 19b)
$ti->list_tables($dbh, $table, @types); # $dbh->table_info('', '', # 'FOO%', # 'TABLE,VIEW');
Called in response to $dbh->table_info($cat, $schem, $table, $types). $cat and $schem are presently ignored.
This is the workhorse method that must return an appropriate statement handle of tables given the requested $table pattern and @types. A blank $table pattern means "any table," and an empty @types list means "any type."
@types is a list of user-supplied, requested types. "DBD::Firebird::db::table_info" will normalize the user-supplied types, stripping quote marks, uppercasing, and removing duplicates.
$tbl_info->list_types($dbh); # $dbh->table_info('', '', '', '%')
Called in response to $dbh->table_info('', '', '', '%'), returning a statement handle with a TABLE_TYPE column populated with the results of supported_types. (Rule 19c)
Normally not overridden. Override supported_types, instead.
$tbl_info->supported_types($dbh);
Returns a list of supported DBI TABLE_TYPE entries. The default implementation supports 'TABLE', 'SYSTEM TABLE' and 'VIEW'.
This method is called by the default implementation of "list_types".
2025-01-19 | perl v5.40.0 |