NAME
DBIO::MySQL::Introspect::Tables - Introspect MySQL/MariaDB tables and views
VERSION
version 0.900004
DESCRIPTION
Fetches MySQL/MariaDB table and view metadata from information_schema.tables, scoped to the current DATABASE().
METHODS
fetch
my $tables = DBIO::MySQL::Introspect::Tables->fetch($dbh);
Returns a hashref keyed by table name. Each value is a hashref with keys: table_name, kind (table or view), engine, table_collation, row_format, comment.
A view carries a further key, view_definition: the SELECT the server holds for it (information_schema.views), with the name of the current database taken out of every qualified name. The server writes `db`.`table`.`column` into the definition it keeps, so a view made in a temporary database -- the target of an upgrade -- would never equal the same view in the live one, and the statement the diff creates the view with would read from the database it was introspected in.
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.