db-browser - Search and read in SQLite/MySQL/PostgreSQL databases.
db-browser
SQLite/MySQL/PostgreSQL
Version 0.004
db-browser db-browser -h|--help
When the db-browser is called with the argument -h|--help it shows a menu - see "Options".
-h|--help
db-browser [-s|--search] [directories to be searched]
If no directories are passed the home directory is searched for SQLite databases.
SQLite
db-browser called with -s|--search causes a new search of SQLite databases instead of using the cached data.
-s|--search
Search and read in SQLite/MySQL/PostgreSQL databases.
To be able to browse database-, schema- and table-lists and the content of tables one needs to have the database privileges required for fetching the respective data.
The db-browser expects an UTF-8 environment.
UTF-8
The configuration file and the file with the cached search results for SQLite databases are located in the $HOME/.db_browser_conf directory.
The best way to find out how db-browser works is calling db-browser.
To be able to use all the features of the db-browser some basic SQL knowledge is required.
SQL
the Arrow keys (or hjkl) to move up and down respectively to move right and left.
Arrow
hjkl
the PageUp key (or Ctrl-B) to go back one page, the PageDown key (or Ctrl-F) to go forward one page.
PageUp
Ctrl-B
PageDown
Ctrl-F
the Home key (or Ctrl-A) to jump to the beginning of the menu, the End key (or Ctrl-E) to jump to the end of the menu.
Home
Ctrl-A
End
Ctrl-E
the Enter/Return key to confirm a chosen menu item.
Enter/Return
The q key goes back (Ctrl-D instead of q if prompted for a string) in the menu hierarchy.
q
Ctrl-D
Show this Info.
Set the number of spaces between columns.
Set the width the columns should have at least when printed.
Set the string that will be shown on the screen if a table value is undefined.
Set the maximum number of fetched table rows. This can be overwritten by setting a SQL LIMIT statement.
LIMIT
Set the progress bar threshold. The threshold refers to the list size (rows x columns).
Choose the needed database drivers.
Choose the needed operators.
Choose the thousands separator displayed in menus.
With the Sssc mode "compat" enabled back-arrows are offered in the SQL "sub-statement" menus. In the "simple" mode it can be used the q key instead of the back-arrows.
To reset a SQL "sub-statement" (e.g WHERE) re-enter into the "sub-statement" and choose '- OK -'.
WHERE
'- OK -'
Set the behavior of different menus.
For the menus "Choose Database", "Choose Schema" and "Choose Table" setting Expand to "Enchanted" means: save the menu position.
For "Print Table" "Enchanted" means: enable printing the chosen row.
Set the mouse mode (see "mouse" in Term::Choose).
Set the default lock value:
- Lk0: Reset the SQL-statement after each "PrintTable".
- Lk1: Reset the SQL-statement only when a table is selected.
If enabled system tables/schemas/databases are appended to the respective list.
If enabled REGEXP will match case sensitive.
REGEXP
With MySQL the sensitive match is achieved by enabling the BINARY operator.
MySQL
BINARY
Determine how often db-browser asks for the login data:
- for every connection: log in data is asked for every new database connection.
- once per DB: log in data is asked only once per database.
- only once: log in data is asked only once and then used for all connections.
Set Database defaults:
If set the default user is used as username for database logins.
If enabled the utf8 flag will be turned on for character data coming from the database.
utf8
For a more detailed explanation see the documentation of the respective Perl DBI driver.
DBI
Print "BNRY" instead of arbitrary binary data.
If the data matches the repexp /[\x00-\x08\x0B-\x0C\x0E-\x1F]/ it is considered arbitrary binary data.
/[\x00-\x08\x0B-\x0C\x0E-\x1F]/
Printing arbitrary binary data could break the output.
Database defaults can be overwritten for each Database with the "Database settings".
Matthäus Kiem <cuer2s@gmail.com>
Copyright 2012-2014 Matthäus Kiem.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::DBBrowser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::DBBrowser
CPAN shell
perl -MCPAN -e shell install App::DBBrowser
For more information on module installation, please visit the detailed CPAN module installation guide.