NAME
db-browser
- Browse SQL databases and their tables interactively.
VERSION
Version 2.416
SYNOPSIS
db-browser -h|--help
db-browser
db-browser data source, ...
When the db-browser
is called with the argument -h|--help
, it displays a menu. The menu entry Help shows this documentation - see "OPTIONS".
If db-browser
is called without arguments, the user can choose from the databases offered by the database plugin.
If db-browser
is called with arguments, those arguments are used as the available data sources.
SQLite/Firebird
db-browser -s|--search
Calling db-browser
with -s|--search
initiates a new search for databases instead of using cached data.
DESCRIPTION
Before using db-browser
, ensure you have backed up your databases.
Search and read in SQL databases: one can interactively browse databases and their tables.
App::DBBrowser
provides and supports plugins for the DBI drivers DBD::SQLite
, DBD::mysql
, DBD::MariaDB
, DBD::Pg
, DBD::Firebird
, DBD::DB2
, DBD::Informix
, DBD::Oracle
and DBD::ODBC
. Refer to App::DBBrowser::DB for guidance on writing a database plugin.
NAVIGATION
Menus
Use the
Arrow
keys (orh,j,k,l
) to move up and down and to move right or left.Press the
PageUp
key (orCtrl-P
) to go to the previous page and thePageDown
key (orCtrl-N
) to go to the next page.Press the
Home
key (orCtrl-A
) to jump to the beginning of the menu and theEnd
key (orCtrl-E
) to jump to the end of the menu.
When the mouse option is enabled, you can use the left mouse key to navigate through the menus.
To confirm a chosen menu item, use the Return
key.
In some submenus, it is possible to select more than one item before pressing Return
(e.g., the input filters Choose Rows and Choose Cols); in such submenus, the list of items marked with the SpaceBar
is added to the chosen items when Return
is pressed. If the mouse mode is enabled, you can use the right mouse key instead of the SpaceBar
. Pressing Ctrl-SpaceBar
inverts the made choices - for example, to select all but one, select the one with the SpaceBar
and then press Ctrl-SpaceBar
.
Read-line
Use
BackSpace
orStrg-H
to delete the character behind the cursor andDelete
to delete the character at the cursor.Press
Strg-U
to delete the text backward from the cursor to the beginning of the line andStrg-K
to delete the text from the cursor to the end of the line.Use
Right-Arrow
to move forward a character andLeft-Arrow
to move back a character.Press
Page-Up
to move back 10 characters andPage-Down
to move forward 10 characters.Use
Home
orStrg-A
to move to the start of the line andEnd
orStrg-E
to move to the end of the line.
Some read-line
s have predefined values. You can access these values with the Up-Arrow
and Down-Arrow
keys.
To exit a read-line
without returning anything, press Ctrl-X
. When the input buffer is empty and Enter
is pressed, read-line
returns an empty string.
OUTPUT
The elements are right-justified if they look like a number; otherwise, they are left-justified.
If the option squash_spaces is enabled, leading and trailing spaces are removed from the elements, and spaces are squashed to a single white space.
Tab characters (\t
) are replaced with a space.
Vertical spaces (\v
) are squashed to two spaces.
Control characters, code points of the surrogate ranges and non-characters are removed.
See also the option group "Output".
Ctrl-F
opens a prompt. A regular expression is expected as input. This enables one to display only rows where at least one column matches the entered pattern. See option "Search".
MENUS
Plugins Menu
Choosing a plugin leads to the Databases Menu.
(If there is only one plugin, the plugins menu is not shown, but the plugin is chosen automatically.)
Databases Menu
Choosing a database leads to the Schemas Menu.
(If there is only one database, the databases menu is not shown, but the database is chosen automatically.)
Schemas Menu
Choosing a schema leads to the Tables Menu.
(If there is not more than one schema, the schemas menu is not shown, but the schema is chosen automatically.)
Tables Menu
The menu entries of the tables menu:
Prompt Line
Selecting the prompt line (the database name) opens a menu with these entries:
Create Table
Drop Table
Create View
Drop View
Attach DB
Detach DB
DB Settings
For Create Table, Drop Table, Create View and Drop View, see "WRITE ACCESS".
These entries are available if enabled in "Extensions".
Attach DB is available for SQLite
databases. Attach DB can be used to attach databases to the current database.
For DB Settings, see "DB Settings".
Tables Entries
Choosing one of the tables leads to the SQL Menu.
Derived
Derived is available if enabled in "Extensions".
Enter a subquery and use it as a table.
By selecting the Read-Line menu entry, the user is asked for the query.
If stored statements are available, it is also possible to select one of those statements instead of entering a query.
Previously entered queries and the last statements printed with Print TABLE are stored temporarily.
Statements can be saved permanently in the submenu, which opens by selecting the prompt line in the Subquery menu (Choose:).
Cte
Common table expression, available if enabled in "Extensions".
- New Cte
-
The user is asked for the CTE query and the CTE name. The syntax of the CTE name is:
[RECURSIVE] cte_name [(col_name [, col_name] ...)]
Some database types build recursive CTEs without the
RECURSIVE
keyword.By selecting the Read-Line menu entry, the user can enter the query.
If stored statements are available, it is also possible to select one of those statements instead of entering a query.
Previously entered queries and the last statements printed with Print TABLE are stored temporarily.
Statements can be saved permanently in the submenu, which opens by selecting the prompt line in the CTE menu (Choose:).
- Available Ctes
-
Select from the available ctes.
- Reset
-
Removes ctes. In Join and Union: ctes that are used directly or indirectly are retained when Reset pressed.
Don't use the Reset button when in a CTE special tables such as subqueries or functions are joined with an implicit join.
Join
Join tables.
This entry is available if enabled in "Extensions".
Union
Combine the result from multiple SELECT
statements with Union
, Intersect
and Except
(Firebird
: Union).
This entry is available if enabled in "Extensions".
SQL Menu
SQL statements are created in this menu.
The SQL Menu has the following menu entries:
Prompt Line
Selecting this prompt line (Customize:) opens a menu with these entries:
Insert
Update
Delete
See "WRITE ACCESS". These entries are available if enabled in "Extensions".
BACK
If the user has set substatements, selecting BACK
will reset all changes made.
If no changes have been made or if the changes have been reset, selecting BACK
will exit the SQL menu.
Print TABLE
Select Print TABLE to show the result of the formed statement on the screen.
The Sub-Statements Entries
In a SQL submenu (e.g., WHERE
), the back arrow resets the subquery step by step. With no items left, the SQL submenu is left when the back arrow is chosen.
Adding AGGREGATE functions or GROUP BY columns enables the aggregate mode. In aggregate mode, the available columns in the SELECT substatement are the added aggregate functions and the group-by columns, not the table columns.
See also "Extensions" and "Operators"
SELECT
Choose the required columns for the SELECT
substatement.
It is possible to add many columns at once by marking them with the SpaceBar
key. If columns are marked with the SpaceBar
, the highlighted column is not added to the chosen when Return
is pressed.
AGGREGATE
AVG
, COUNT
, COUNT(*)
, GROUP_CONCAT
, MAX
, MIN
, SUM
If the user has selected columns in the SELECT submenu: While in this submenu, the available columns are displayed in the SELECT substatement instead of the selected columns.
DISTINCT
WHERE
GROUP BY
If the user has selected columns in the SELECT submenu: While in this submenu, the available columns are displayed in the SELECT substatement instead of the selected columns.
HAVING
ORDER BY
LIMIT
Export
Export the result of the chosen SQL statement to a CSV
-file. See options "Export Data".
WRITE ACCESS
Create/Drop Table/View
Create/Drop Table/View can be accessed by selecting the prompt-line in the "Tables Menu" if the respective option is activated.
Selecting the prompt line of the Create/Drop Table/View submenu allows you to set the parse settings described in "Import Data".
Create Table
If the option Source Type is set to menu, selecting Create Table opens a submenu where you can choose the type of the data source. If Source Type is set to plain or file, the set data source type is automatically used without displaying a menu. For more information, see "Data Input".
You will be prompted:
for the table name
if the first data row should be used as a header
Selecting the prompt line of this menu allows you to set the 'create table' options.
if an auto increment column should be added (if the option is enabled in "Create-Table")
to edit the column names
to edit the column data types
to confirm the creation of the table
Drop Table
Dropping a table displays the entire table before confirming the deletion.
Create View
Before creating a view, print the required select statement to make it available in the subquery menu.
Drop View
Drop a view. The entire view is shown before the user confirms dropping it.
Insert/Update/Delete
Insert, Update and Delete can be accessed by selecting the prompt-line in the "SQL Menu" if the respective option is activated.
Delete, Update, or Insert may not be available with Join
and Union
/Intersect
/Except
statements.
Insert
If the option Source Type is set to menu, selecting Insert opens a submenu where one can choose the type of the data source. If Source Type is set to plain or file, the set data source type is used without showing a menu. For more information, see "Data Input".
If the first column of a table is an auto-increment column, the INSERT INTO
statement is built without this first column. This feature is available if supported by the database plugin.
Update
Update records. The affected (and not yet updated) records are shown before the user confirms the update.
Delete
Delete records. The affected records are shown before the user confirms the deletion.
Data Input
Data Source
- plain
-
Insert the data cell by cell.
- file
-
The data is read from a chosen file.
Supported file formats: text files and file formats supported by Spreadsheet::Read.
Spreadsheet::Read
uses different parser modules for the different file formats - see "DESCRIPTION" in Spreadsheet::Read. The parser modules are not installed automatically. It is up to the user to install the required parser modules.Selecting file opens the Source directory submenu where one can choose the directory which should be searched for files.
If the "Directory History" is set to
1
, the Source directory submenu is skipped and the directory is chosen automatically.After a directory has been chosen, a submenu is opened where one can choose the source file.
If the previous submenu Source directory is not shown due to the settings described before, it is possible to change the source directory in this submenu by selecting Change dir.
Selecting the prompt line of the Files submenu (Choose a File:) allows one to set the parse settings described in "Import Data".
After the data has been read, the user can apply different input filters (See "Input Filters").
Input Filters
- Choose Cols
-
Use only selected columns of the imported data.
If the data has empty columns (
--
), the non-empty columns are preselected. Columns are regarded as empty if the values of all fields in the column - including the column header - have no length.Columns added with the filter Append Col are empty and therefore not preselected.
If a column is not empty but has no header name, the header is named temporarily
tmp
. - Choose Rows
-
Use only selected rows of the imported data.
If the data has empty rows, the non-empty rows are preselected. Rows are regarded as empty if the values of all fields in the row have no length.
- Range Rows
-
Use only a range of rows.
- Row Groups
-
If the input has rows with different numbers of columns, Row Groups sorts rows with the same number of columns into a group. The user can then choose one or more groups of rows. There is only one group if all rows have the same column count.
- Remove Cell
-
Remove a cell from a chosen row.
- Insert Cell
-
Insert a cell in a chosen row. The new cell is inserted in front of a chosen cell.
- Append Col
-
Append an empty column. Appends a header element to the header row and adjusts the remaining rows to the length of the header row. If the input has rows with different numbers of cells, use the Row Group filter first to select the right row-group.
- Split Column
-
Item | length/width/height Item | length | width | height ------|--------------------- -----|--------|-------|------ 423 | 40/30/25 423 | 40 | 30 | 25 ------|--------------------- -----|--------|-------|------ 64 | 80/60/30 64 | 80 | 60 | 30 ------|--------------------- -----|--------|-------|------ 705 | 50/50/40 705 | 50 | 50 | 40
- Search & Replace
-
s/Pattern/Replacement/Modifiers
Remove all commas:
s/,//g
id | num id | num ---|------------- ---|----------- 1 | 78,975.17 1 | 78975.17 ---|------------- ---|----------- 2 | 1,040,745.87 2 | 1040745.87 ---|------------- ---|----------- 3 | 3,129,818.21 3 | 3129818.21
Supported modifiers:
imnsxage
.In the replacement, the variable
$c
can be used as a counter.$c
is set to0
before eachs///
.By selecting the prompt line (Your choice:), one can save search & replace instructions for later use.
If a search & replace has altered the first row of the input data, a menu entry named
RESTORE header row
is offered. - Convert DateTime
-
Convert a DateTime to another format or to seconds since the Unix epoch.
id | date_time id | date_time ---|---------------------------- ---|-------------------- 1 | Sat 13 Aug 2022 07:38:49 PM 1 | 2022-08-13 19:38:49 ---|---------------------------- ---|-------------------- 2 | Mon 15 Aug 2022 12:08:54 PM 2 | 2022-08-15 12:08:54 ---|---------------------------- ---|-------------------- 3 | Tue 16 Aug 2022 09:56:13 AM 3 | 2022-08-16 09:56:13
- Split Table
-
y | factor | y | factor y | factor ----|--------|----|-------- ---|------- 62 | 8975.1 | 64 | 9986.5 62 | 8975.1 ----|--------|----|-------- ---|------- 63 | 9745.8 | 65 | 9782.7 63 | 9745.8 ---|------- y | factor ---|------- 64 | 9818.2 ---|------- 65 | 9986.5
- Merge Rows
-
Month | Average | Average Month | Average MinTemp | Average MaxTemp -------|---------|--------- ------|-----------------|---------------- | MinTemp | MaxTemp Jan | 9 | 22 -------|---------|--------- ------|-----------------|---------------- Jan | 9 | 22 Feb | 10 | 23 -------|---------|--------- Feb | 10 | 23
Merge Rows can be used to edit a row by selecting only one row.
- Join Columns
-
Item | length | width | height Item | length/width/height ------|--------|-------|-------- -----|------------------- 423 | 40 | 30 | 25 423 | 40/30/25 ------|--------|-------|-------- -----|------------------- 64 | 80 | 60 | 30 64 | 80/60/30 ------|--------|-------|-------- -----|------------------- 705 | 50 | 50 | 40 705 | 50/50/40
Join Columns can be used to edit a column by selecting only one column.
- Fill up Rows
-
If the input table rows have different numbers of cells, this filter appends empty cells to the rows until the cell count of each row is equal to the cell count of the row with the highest cell count.
You can enter the Row Group filter to check if the table has rows with different lengths. If Row Group shows only one group, all rows have the same length.
- Cols to Rows
-
Transpose columns to rows.
Year | 2000 | 2001 | 2002 Year | Max | Min ------|------|------|------ -----|-----|---- Max | 14 | 22 | 17 2000 | 14 | 11 ------|------|------|------ -----|-----|---- Min | 11 | 10 | 9 2001 | 22 | 10 -----|-----|---- 2002 | 17 | 9
- Empty to NULL
-
Convert fields containing an empty string to NULL (undefined).
The default values for this filter can be set using the option "Empty to Null".
- Reset
-
Reset the filters.
- Reparse
-
Change the parse settings and reparse the data with the new settings.
OPTIONS
The options menu is accessed with db-browser -h
.
Plugins
Choose the required database plugins.
DB Settings
These driver-specific DB Settings are used as the default database settings.
In the prompt line menu of the "Tables Menu", the entry DB Settings (if enabled in "Extensions") allows users to make database-specific settings. If no database-specific settings are set, these global settings (for the database plugin) DB Settings are used.
User-defined database plugins: The options offered to be set in each option and whether the user's selections are considered depend on the plugin.
- Fields
-
Set which fields are required to connect to a database.
- Login Data
-
The entered login data is saved in a configuration file and used to connect to the database (the password cannot be saved).
- ENV Variables
-
The user can choose environment variables from a list of environment variables that should be used - if set - to connect to the database.
- Attributes
-
For the meaning of these driver-specific attributes, refer to the appropriate driver documentation.
- Reset DB
-
Reset database-specific parameters to the global DB Settings.
Extensions
Add menu entries to menus:
Tables Menu
Join Menu
Union Menu
Note: Parentheses are not available in SQLite
and Firebird
.
These settings are also valid when Intersect
or Except
is used.
Columns and Values
Extended Columns
If enabled,
%%
is shown as an additional menu entry in the column menus. Selecting%%
lets one choose between the available extensions.Extended Values
If enabled, then - in addition to constants - subqueries, functions and more (see the following list) are available for the right side of operators. Places where extended values are available:
WHERE
,HAVING
,SET
in update, andWHEN
,THEN
andELSE
in case expressions.Extended Arguments
If enabled, subqueries, functions and more (see the following list) are available for entering arguments in addition to constants in the scalar and window functions.
This option can also be enabled later in the functions menu by selecting the prompt line.
Column/Value/Argument Extensions
Not all of these extensions are available everywhere.
- Subqueries
-
Selecting
SQ
opens the subqueries menu.By selecting the Read-Line menu entry, one can enter a subquery or an expression.
If stored subqueries are available, it is also possible to select one of those subqueries instead of entering a subquery.
The last subqueries entered in the subquery menu and the last statements printed with Print TABLE are stored temporarily.
A subquery can be saved permanently in the submenu, which opens by selecting the prompt line of a subquery menu (Choose SQ:).
Entries matching
/^\s*(?:SELECT|WITH)\s/i
are automatically enclosed in parentheses. - Scalar Functions
-
Selecting
func()
opens the menu, where the user can choose from a list of scalar functions.Extended arguments for scalar functions can be temporarily enabled by selecting the prompt line (Scalar functions:) of the scalar function menu.
DATEADD
,EXTRACT
and some other functions: use the keysUp-Arrow
andDown-Arrow
to choose one of the predefined fields (inValue
if the extended arguments are enabled).TO_EPOCH
andOracle
: the argument Column type can be any of the following: DATE, TIMESTAMP or TIMESTAMP_TZ. If the column type is DATE or TIMESTAMP the session timezone is used as timezone.Scalar functions may not work with the
ODBC
plugin. - Window Functions
-
Selecting
win()
opens the menu, where the user can choose from a list of window functions. - Case Expression
-
Selecting
case
opens the menu, where the user can build aCASE
expression. - Maths
-
Selecting
math()
opens the menu, where the user can combine expressions with arithmetic operators. - Columns
-
Selecting
col
opens the menu, where the user can choose a column. - Set to
NULL
-
Available after the
SET
in anUPDATE
statement. - Parentheses
-
WHERE
,WHEN
andHAVING
: in the%%
menu are also available parentheses. - Column Aliases
-
Selecting
as
allows one to set aliases for the selected columns.
Write Access
Enable write access - use with care.
Insert Records
Update Records
Delete Records
Create Table
Drop Table
Create View
Drop View
SQL Settings
System Data
If System data is enabled, system tables/schemas/databases are appended to their respective lists.
Operators
Choose the required operators.
There are two regexp entries: REGEXP
matches case-sensitive, while REGEXP_i
matches case-insensitive.
With MySQL
, the sensitive match is achieved by enabling the BINARY
operator.
With Firebird
, SIMILAR TO
is used instead of REGEXP
.
With Informix
, MATCHES
is used instead of REGEXP
.
Aliases
Alias settings for:
Functions/Subqueries in SELECT
Tables in JOIN
Non-unique columns in JOIN
Derived table
PostgreSQL
,MySQL
andMariaDB
: ensure that aliases for derived tables are enabled.Ordinary table
Possible settings:
NO
no alias
AUTO
a default alias is used
ASK
the user is asked for the alias; if nothing is entered, no alias is added
ASK/AUTO
the user is asked for the alias; if nothing is entered, a default alias is added
Not all of these settings are available for any alias type.
Identifiers
Qualified Table Names
Quote Table Names
Quote Column Names
Quote Aliases
SQLite
: if the current database has attached databases, the use of qualified table names is enabled automatically.
SQLite
: database names in SQL statements (ATTACH DATABASE
) are always quoted.
Informix
: set the DELIMIDENT
environment variable to allow quoted identifiers.
View Prefix
Enter a string that should be automatically placed in front of all view names.
Create-Table
Enable Options
Auto Increment
Enabling Auto Increment makes the 'auto-increment primary key' option available when creating a table.
Data Type Guessing
When this option is enabled and a table is created,
SQL::Type::Guess
is used to guess the data types. These data types are then used as defaults when the user is prompted for data types.
Add Form Fields
Table Constraint Fields
Specify the number of fields available for entering table constraints (0-9).
Table Option Fields
Specify the number of fields available for entering table options (0-9).
Auto Increment Column Name
Set the default value for the auto-increment primary key column name.
Output
Binary Filter
Set Binary filter to NO
, BNRY
, or Hexadecimal
.
NO
- print the binary data as it is
BNRY
- "BNRY" is printed instead of the binary data
Hexadecimal
- the binary data is printed in hexadecimal format
If the first 100 characters of the data match the regexp /[\x00-\x08\x0B-\x0C\x0E-\x1F]/
, the data is considered arbitrary binary data.
Printing unfiltered arbitrary binary data could break the output.
Squash Spaces
If squash_spaces is enabled, consecutive spaces are squashed to one space, and leading and trailing spaces are removed.
Indentation
Set the indentation width for the SQL substatements.
Undef String
Set the string that will be shown on the screen instead of an undefined field.
On MSWin32
, only single-byte character sets are supported when entering the setting Undef string, user, host, or port with the db-browser
's readline. However, it is possible to edit the entry in configuration files directly after the entry was created with this options menu.
Warnings
Enable/disable:
File::Find
warnings when searching forSQLite
databases.Warnings (e.g., UTF-8 warnings) when printing a table.
Progress Bar
Set the progress bar threshold. If the number of fields (rows x columns) exceeds the threshold, a progress bar is shown while preparing the data for output.
Tab Width
Set the number of spaces between columns.
Color
Enable support for color and text formatting escape sequences (SGR) by setting it to Enable
. Before the output, a reset (\e[0m
) is added at the end of each row.
Truncate Fractions First
If the terminal width is insufficient and Trunc fract first is enabled, the first step to reduce the column width is to truncate the fraction part of numbers to 2 decimal places.
Truncate Column Threshold
Columns with a width below or equal to Trunc col threshold are only trimmed if it is still necessary to reduce the row width, even after all columns wider than Trunc col threshold have been trimmed to Trunc col threshold.
Import Data
Parse Tool
Set how to parse text files. Files for which -T $filename
returns true are considered text files. If a file isn't a text file, Spreadsheet::Read
is always used to parse it, regardless of this setting.
Text::CSV
Advantages:
Allows different CSV-related options.
Speed
split
Reads the entire input at once and splits it using the input record separator (IRS) to obtain the records (rows). It then splits the records using the input field separator (IFS) to acquire the fields (columns) of each record.
To decode the files, the "File Encoding" is used.
Advantages:
The values assigned to the input record separator (IRS) and the input field separator (IFS) are treated as regex patterns.
Template
Uses
unpack
with theA
character to break up input lines.If the row length exceeds the screen width, take note of the number of columns and the length of each column before using Template.
Choose the input record separator.
Set the number of columns (Col count) and the width of the column separator (Sep width). Col count expects an integer of 1 or greater; Sep width expects an integer of 0 or greater.
Set the widths of the columns (1 or greater). For the last column, one can also enter an asterisk (
*
). An asterisk in the last column means: Use the remaining part of the row for the last column.Decide whether leading spaces should be removed. Trailing whitespaces are removed automatically.
Advantages:
Ideal for fixed-length inputs containing only single-width characters.
Spreadsheet::Read
If
Spreadsheet::Read
is chosen, the default settings from Spreadsheet::Read are utilized.Spreadsheet::Read
will use the first line of the file to auto-detect the separation character if the file is a CSV file.Spreadsheet::Read::rows
automatically fills up uneven rows, so the filters "Fill up Rows" and "Row Groups" have no significance whenSpreadsheet::Read
is used.Advantages:
Automatically detects the separation character for CSV files.
CSV Options In a
Set sep_char
, quote_char
, escape_char
, eol
and comment_str
. If left empty, default values are used. For details on these options, refer to Text::CSV_XS.
CSV Options In b
Set allow_loose_escapes
, allow_loose_quotes
, allow_whitespace
, blank_is_undef
, binary
, decode_utf8
, empty_is_undef
and skip_empty_rows
. For meanings of these options, refer to Text::CSV_XS.
Settings 'split'
Record Separator
Set the input record separator (regexp).
Trim Record Left
Expects a regex pattern. If set, removes leading characters matching the regexp from each record.
Trim Record Right
Expects a regex pattern. If set, removes trailing characters matching the regexp from each record.
Field Separator
Set the input field separator (regexp).
Trim Field Left
Expects a regex pattern. If set, removes leading characters matching the regexp from each field.
Trim Field Right
Expects a regex pattern. If set, removes trailing characters matching the regexp from each field.
Input Filter
Enable the input filter menu.
Enabling input filter will cause a second copy of the data to be kept in memory.
Empty to Null
Set the empty_to_null defaults for the different data source types.
File Encoding In
How to decode text files.
Directory History
Set how many searched directories should be saved in the directory history.
A value of 0
disables the history.
If Directory History is set to 1
and a directory has been saved, the directory is chosen automatically without showing the history menu.
File Filter
This option expects a string as its value, used as a glob pattern.
If file is selected as the data source type, only files matching this glob pattern are part of the available files.
Hidden Files
If file is selected as the data source type, this setting determines if hidden files are included in the available files or not.
Source Type
Set the data source type to plain
, file
, or menu
for Insert Into
and for Create Table
.
If set to menu
, a menu is offered where the user can choose the type of the data source. If set to plain
or file
, the respective setting is used directly without any menu.
Export Data
Destination Folder
Set the folder where the data to be exported will be saved as a CSV file.
File Name
- File Extension CSV
-
If enabled, the file extension
csv
is automatically added to the file name. - Default File Name
-
If enabled, the table name will be used as the default file name.
CSV Options Out a
Set sep_char
, quote_char
, escape_char
, eol
and undef_str
.
If left empty, default values are used except for eol
, which is then set to $/
(input record separator).
For the meaning of the different options, see Text::CSV_XS.
CSV Options Out b
Set always_quote
, binary
, escape_null
, quote_binary
, quote_empty
and quote_space
.
For the meaning of the different options, see Text::CSV_XS.
File Encoding Out
The encoding of the exported CSV file.
Miscellaneous
Menu Memory
If enabled, saves the menu position while entering a submenu.
Expand Table
Expand table rows:
YES
-
If
Return
is pressed, the selected table row is printed with each column in its line. The first row is not expanded if the cursor auto-jumped to the first row. NO
-
Don't expand table rows.
Search
Set the search behavior (Ctrl-F
).
disabled
case-insensitive search
case-sensitive search
Mouse Mode
Set the Mouse mode (see "mouse" in Term::Choose).
DB2 Encoding
For DB2
databases only: set the application code set.
Data from a DB2 database is decoded using this encoding.
Help
Display this documentation.
Path
Displays the version and path of the running db-browser
, along with the application directory path.
CONFIGURATION FILES
To locate the configuration files, run db-browser -h
and select Path. The data is saved in JSON format.
REQUIREMENTS
Perl Version
Requires Perl version 5.14.0 or later.
Decoded Strings
db-browser
expects decoded strings.
Non-mappable characters can disrupt the output.
Terminal
Requires a terminal with a monospaced font supporting the printed characters.
The terminal must comprehend ANSI escape sequences. For MSWin32, App::DBBrowser
utilizes Win32::Console::ANSI to emulate an ANSI console for the db-browser
.
Permissions
To browse the database, schema, table lists and table content, the user must possess the necessary database privileges for fetching the requested data.
db-browser
expects an existing home directory with read and write permissions for the user of the db-browser
.
CREDITS
Thanks to the Perl-Community.de and the people form stackoverflow for the help.
AUTHOR
Matthäus Kiem <cuer2s@gmail.com>
LICENSE AND COPYRIGHT
Copyright 2012-2024 Matthäus Kiem.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For details, see the full text of the licenses in the file LICENSE.