DBD::F...::Basic(3pm)

πŸ’– DBD::Firebird::TableInfo::Basic β€” ok bestie, let's get into it πŸ’–

So you're reading DBD::F...::Basic(3pm), which lives in the ✨ User Contributed Perl Documentation ✨ pile. And what we have here is DBD::Firebird::TableInfo::Basic β€” a whole base class, and it's giving "lowest-common denominator Firebird table_info() querying." Like, it handles the absolute basics that every Firebird-ish thing agrees on, and you build the rest on top. Main character energy fr. πŸ‘‘


🌸 NAME 🌸

DBD::Firebird::TableInfo::Basic β€” a base class for lowest-common denominator Firebird table_info() querying. That's it, that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

Like, here's how you'd actually use it, bestie. Say you wanna add support for some hypothetical IB derivative:

# 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) = @_;
}

See what's happening? You inherit, you declare your types, you handle table_info, and you're slaying. πŸ’…


πŸŽ€ INTERFACE πŸŽ€

Okay so here's every method, one by one, no skipping, I promised. pinky promise 🫢

list_catalogs πŸ’«

$ti->list_catalogs($dbh);  # $dbh->table_info('%', '', '')

You call this and you get back a statement handle with an empty result set. Why empty? Because IB literally does not support the DBI concept of catalogs, babe. Nothing to see here. (Rule 19a) πŸ™ˆ

list_schema 🌈

$ti->list_schema($dbh);    # $dbh->table_info('', '%', '')

Same situation, different noun: returns a statement handle with an empty result set, because IB does not support the DBI concept of schema either. (Rule 19b) ibidi-ibi, that's just how it is. πŸ’€

list_tables πŸ”₯

$ti->list_tables($dbh, $table, @types); # $dbh->table_info('', '',
                                        #                  'FOO%',
                                        #                  'TABLE,VIEW');

This one gets called in response to $dbh->table_info($cat, $schem, $table, $types). And heads up β€” $cat and $schem are, like, presently ignored. Not their era. 😌

This is the workhorse method. It's the one that has to return an appropriate statement handle of tables given the requested $table pattern and @types. And real talk:

  • A blank $table pattern means "any table"
  • An empty @types list means "any type"

@types is a list of user-supplied, requested types, and "DBD::Firebird::db::table_info" will normalize the user-supplied types for you β€” stripping quote marks, uppercasing, and removing duplicates. It's giving personal assistant. πŸ‘‘

list_types πŸ’œ

$tbl_info->list_types($dbh);  # $dbh->table_info('', '', '', '%')

Called in response to $dbh->table_info('', '', '', '%'), and it returns a statement handle with a TABLE_TYPE column populated with the results of supported_types. (Rule 19c) ⭐

Btw bestie, you normally do not override this one. Override supported_types instead. That's the move.

supported_types 🌟

$tbl_info->supported_types($dbh);

Returns a list of supported DBI TABLE_TYPE entries. The default implementation supports 'TABLE', 'SYSTEM TABLE' and 'VIEW'. 🫢

And guess what β€” this method is called by the default implementation of "list_types". They're a package deal, iykyk. 🧚


πŸ¦‹ the sign-off, mwah πŸ¦‹

That's the whole page, bestie, we ate and left no crumbs. πŸ“ This lovely little doc is perl v5.42.3, dated 2026-08-20, and it's still filed under DBD::F...::Basic(3pm). Go forth and table_info() responsibly. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from