NAME

Mojolicious::Plugin::SQLiteViewerLite - Mojolicious plugin to display SQLite database information on browser

SYNOPSYS

# Mojolicious::Lite
plugin 'SQLiteViewerLite', dbh => $dbh;

# Mojolicious
$app->plugin('SQLiteViewerLite', dbh => $dbh);

# Access
http://localhost:3000/sqliteviewerlite

# Prefix
plugin 'SQLiteViewerLite', dbh => $dbh, prefix => 'sqliteviewerlite2';

# Using connection manager
plugin 'SQLiteViewerLite', connector => DBIx::Connector->connect(...);

DESCRIPTION

Mojolicious::Plugin::SQLiteViewerLite is Mojolicious plugin to display SQLite database information on browser.

Mojolicious::Plugin::SQLiteViewerLite have the following features.

  • Display all table names

  • Display show create table

  • Select * from TABLE limit 0, 1000

  • Display primary keys and null allowed columnes 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.

prefix

prefix => 'sqliteviewerlite2'

Application base path, default to sqliteviewerlite.

route

route => $route

Router, default to $app-routes>.

It is useful when under is used.

my $b = $r->under(sub { ... });
plugin 'SQLiteViewerLite', dbh => $dbh, route => $b;