Otogiri::Plugin::TableInfo - retrieve table information from database
use Otogiri::Plugin::TableInfo;
my $db = Otogiri->new( connect_info => [ ... ] );
$db->load_plugin('TableInfo');
my @table_names = $db->show_tables();
Otogiri::Plugin::TableInfo is Otogiri plugin to fetch table information from database.
returns table names in database.
parameter $like_regex
is optional. If it is passed, table name is filtered by regex like MySQL's SHOW TABLES LIKE ...
statement.
my @table_names = $db->show_tables(qr/^user_/); # return table names that starts with 'user_'
If $like_regex
is not passed, all table_names in current database are returned.
returns view names in database.
returns create table statement like MySQL's 'show create table'.
returns create view SQL like MySQL's 'show create view'.
Copyright (C) Takuya Tsuchida.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Takuya Tsuchida tsucchi@cpan.org