NAME
Mojolicious::Plugin::MySQLViewerLite - Mojolicious plugin to display MySQL database information on browser
SYNOPSYS
# Mojolicious::Lite
plugin 'MySQLViewerLite', dbh => $dbh;
# Mojolicious
$app->plugin('MySQLViewerLite', dbh => $dbh);
# Access
http://localhost:3000/mysqlviewerlite
# Prefix
plugin 'MySQLViewerLite', dbh => $dbh, prefix => 'mysqlviewerlite2';
DESCRIPTION
Mojolicious::Plugin::MySQLViewerLite is Mojolicious plugin to display MySQL database information on your browser.
Mojolicious::Plugin::MySQLViewerLite have the following features.
Display all table names
Display
show create table
Select * from TABLE
Display
primary keys
,null allowed columnes
,database engines
andcharsets
in all tables.
OPTIONS
connector
connector => $connector
Connector object such as DBIx::Connector to connect to database.
my $connector = DBIx::Connector->connect(...);
Connector has dbh
method to get database handle.
dbh
dbh => $dbh
Database handle object in DBI.
my $dbh = DBI->connect(...);
prefix
prefix => 'mysqlviewerlite2'
Application base path, default to mysqlviewerlite
.
route
route => $route
Router, default to $app-
routes>.
It is useful when under
is used.
my $b = $r->under(sub { ... });
plugin 'MySQLViewerLite', dbh => $dbh, route => $b;