NAME
DBIO::Introspect::DBI - DBI-based introspection via standard metadata APIs
VERSION
version 0.900000
DESCRIPTION
DBIO::Introspect::DBI wraps DBI metadata APIs (column_info, primary_key, foreign_key_info, table_info) into the normalized contract defined in DBIO::Introspect::Base.
Driver-specific introspectors (DBIO::PostgreSQL::Introspect, DBIO::SQLite::Introspect, etc.) inherit from this when they want to override with native queries for accuracy or features.
ATTRIBUTES
dbms_name
The DBI driver name (e.g., Pg, SQLite, mysql). Auto-detected from dbh if not provided.
METHODS
table_keys
Returns all tables and views as [schema.]table strings.
table_columns
my \@names = $intro->table_columns($key);
Ordered list of column names for $key.
table_columns_info
my \%info = %{ $intro->table_columns_info($key) };
Hashref { col_name = { data_type, size, is_nullable, default_value, is_auto_increment, ... } }>.
table_pk_info
my \@pk_cols = @{ $intro->table_pk_info($key) };
Ordered list of primary key column names.
table_uniq_info
my \@constraints = @{ $intro->table_uniq_info($key) };
List of [ $constraint_name, \@col_names ] pairs.
table_fk_info
my \@fks = @{ $intro->table_fk_info($key) };
Each FK is a hashref:
{
local_columns => [qw/author_id/],
remote_table => 'authors',
remote_schema => 'public', # may be undef
remote_columns => [qw/id/], # may be [] (use remote PK)
attrs => {},
}
table_is_view
Returns true if $key is a view rather than a base table.
view_definition
SQL text of the view definition, or undef.
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.