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.
$like_regex
SHOW TABLES LIKE ...
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 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>
To install Otogiri::Plugin::TableInfo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Otogiri::Plugin::TableInfo
CPAN shell
perl -MCPAN -e shell install Otogiri::Plugin::TableInfo
For more information on module installation, please visit the detailed CPAN module installation guide.