App-DBBrowser

 view release on metacpan or  search on metacpan

bin/db-browser  view on Meta::CPAN

If enabled, the data passed to C<SQL::Type::Guess> is encoded.

The setting of this option can affect the size of C<max> in C<varchar(max)> if strings contain multibyte characters.

=back

=head3 Add Form Fields

=over

=item

Table Constraint Fields

Specify the number of fields available for entering table constraints (0-9).

=item

Table Option Fields

Specify the number of fields available for entering table options (0-9).

=back

=head3 Auto Increment Column Name

Set the default value for the auto-increment primary key column name.

=head2 Output

=head3 Binary Filter

Set I<Binary filter> to C<NO>, C<BNRY>, or C<Hexadecimal>.

C<NO> - print the binary data as it is

C<BNRY> - "BNRY" is printed instead of the binary data

C<Hexadecimal> - the binary data is printed in hexadecimal format

If the first 100 characters of the data match the regexp C</[\x00-\x08\x0B-\x0C\x0E-\x1F]/>, the data is considered
arbitrary binary data.

Printing unfiltered arbitrary binary data could break the output.

=head3 Squash Spaces

If I<squash_spaces> is enabled, consecutive spaces are squashed to one space, and leading and trailing spaces are
removed.

=head3 Undef String

Set the string that will be shown on the screen instead of an undefined field.

On C<MSWin32>, only single-byte character sets are supported when entering the setting I<Undef string>, I<user>,
I<host>, or I<port> with the C<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.

=head3 Color

Enable support for color and text formatting escape sequences (SGR) by setting it to C<Enable>. Before the output, a
reset (C<\e[0m>) is added at the end of each row.

=head3 Truncate Fractions First

If the terminal width is insufficient and I<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.

=head3 Indentation

Set the indentation width for the SQL substatements.

=head3 Pad row edges

Add a space at the beginning and end of each table row.

=head3 Tab Width

Set the number of spaces between columns.

=head3 Expand Table Rows

Expand table rows:

=over

=item C<YES>

If C<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.

=item C<NO>

Don't expand table rows.

=back

=head3 Expanded rows line spacing

Insert a blank line between columns when a row is expanded. See option L</Expand Table>.

=head3 Expanded rows max width

Set a maximum width of the expanded table row output. I<Expanded rows max width> set to C<0> means no maximum width. See
option L</Expand Table>.

=head3 Column Trim Threshold

Columns with a width below or equal to I<Column trim threshold> are only trimmed if it is still necessary to reduce the
row width, even after all columns wider than I<Column trim threshold> have been trimmed to I<Column trim threshold>.

=head3 DB2 Encoding

For C<DB2> databases only: set the application code set.

Data from a DB2 database is decoded using this encoding.

=head2 Import Data

=head3 Parse Tool

bin/db-browser  view on Meta::CPAN

=item

Choose the input record separator.

=item

Set the number of columns (I<Col count>) and the width of the column separator (I<Sep width>). I<Col count> expects an
integer of 1 or greater; I<Sep width> expects an integer of 0 or greater.

=item

Set the widths of the columns (1 or greater). For the last column, one can also enter an asterisk (C<*>). An asterisk in
the last column means: Use the remaining part of the row for the last column.

=item

Decide whether leading spaces should be removed. Trailing whitespaces are removed automatically.

=back

Advantages:

=over

=item

Ideal for fixed-length inputs containing only single-width characters.

=back

=back

=over

=item

Spreadsheet::Read

If C<Spreadsheet::Read> is chosen, the default settings from L<Spreadsheet::Read> are utilized.

C<Spreadsheet::Read> will use the first line of the file to auto-detect the separation character if the file is a CSV
file.

C<Spreadsheet::Read::rows> automatically fills up uneven rows, so the filters L</Fill up Rows> and L</Row Groups> have no
significance when C<Spreadsheet::Read> is used.

Advantages:

=over

=item

Automatically detects the separation character for CSV files.

=back

=back

=head3 CSV Options In a

Set C<sep_char>, C<quote_char>, C<escape_char>, C<eol> and C<comment_str>. If left empty, default values are used. For
details on these options, refer to L<Text::CSV_XS>.

=head3 CSV Options In b

Set C<allow_loose_escapes>, C<allow_loose_quotes>, C<allow_whitespace>, C<blank_is_undef>, C<binary>, C<decode_utf8>,
C<empty_is_undef> and C<skip_empty_rows>. For meanings of these options, refer to L<Text::CSV_XS>.

=head3 Settings 'split'

=over

=item

Record Separator

Set the input record separator (regexp).

=item

Trim Record Left

Expects a regex pattern. If set, removes leading characters matching the regexp from each record.

=item

Trim Record Right

Expects a regex pattern. If set, removes trailing characters matching the regexp from each record.

=item

Field Separator

Set the input field separator (regexp).

=item

Trim Field Left

Expects a regex pattern. If set, removes leading characters matching the regexp from each field.

=item

Trim Field Right

Expects a regex pattern. If set, removes trailing characters matching the regexp from each field.

=back

=head3 Input Filter

Enable the input filter menu.

Enabling I<input filter> will cause a second copy of the data to be kept in memory.

=head3 Empty to Null

Set the I<empty_to_null> defaults for the different data source types.

=head3 File Encoding In

How to decode text files.

=head3 Directory History

Set how many searched directories should be saved in the directory history.

A value of C<0> disables the history.

If I<Directory History> is set to C<1> and a directory has been saved, the directory is chosen automatically without
showing the history menu.

=head3 File Filter

This option expects a string as its value, used as a glob pattern.

If I<file> is selected as the data source type, only files matching this glob pattern are part of the available files.

=head3 Hidden Files

If I<file> is selected as the data source type, this setting determines if hidden files are included in the available
files or not.

=head3 Source Type

Set the data source type to C<plain>, C<file>, or C<menu> for C<Insert Into> and for C<Create Table>.

If set to C<menu>, a menu is offered where the user can choose the type of the data source. If set to C<plain> or
C<file>, the respective setting is used directly without any menu.

=head2 Export Data

=head3 Destination Folder

Set the folder where the data to be exported will be saved as a CSV file.

=head3 File Name

=over

=item File Extension CSV

If enabled, the file extension C<csv> is automatically added to the file name.

=item Default File Name

If enabled, the table name will be used as the default file name.

=back

=head3 CSV Options Out a

Set C<sep_char>, C<quote_char>, C<escape_char>, C<eol> and C<undef_str>.

If left empty, default values are used except for C<eol>, which is then set to C<$/> (input record separator).

For the meaning of the different options, see L<Text::CSV_XS>.

=head3 CSV Options Out b

Set C<always_quote>, C<binary>, C<escape_null>, C<quote_binary>, C<quote_empty> and C<quote_space>.

For the meaning of the different options, see L<Text::CSV_XS>.

=head3 File Encoding Out

The encoding of the exported CSV file.

=head2 Miscellaneous

=head3 Warnings

Enable/disable:

=over

=item

C<File::Find> warnings when searching for C<SQLite> databases.

=item

Warnings (e.g., UTF-8 warnings) when printing a table.

=back

=head3 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.

=head3 Search

Set the search behavior (C<Ctrl-F>).

=over

=item

disabled

=item

case-insensitive search

=item

case-sensitive search

=back

=head2 Help

Display this documentation.

=head2 Path

Displays the version and path of the running C<db-browser>, along with the application directory path.

=head1 CONFIGURATION FILES

To locate the configuration files, run C<db-browser -h> and select I<Path>. The data is saved in JSON format.

=head1 REQUIREMENTS

=head2 Perl Version

Requires Perl version 5.16.0 or later.

=head2 Decoded Strings

C<db-browser> expects decoded strings.

Non-mappable characters can disrupt the output.

=head2 Terminal

Requires a terminal with a monospaced font supporting the printed characters.

The terminal must comprehend ANSI escape sequences. For MSWin32, C<App::DBBrowser> utilizes L<Win32::Console::ANSI> to
emulate an ANSI console for the C<db-browser>.

=head2 Permissions

To browse the database, schema, table lists and table content, the user must possess the necessary database privileges
for fetching the requested data.

C<db-browser> expects an existing home directory with read and write permissions for the user of the C<db-browser>.

=head1 CREDITS

Thanks to the L<Perl-Community.de|http://www.perl-community.de> and the people form
L<stackoverflow|http://stackoverflow.com> for the help.

=head1 AUTHOR

Matthäus Kiem <cuer2s@gmail.com>

=head1 LICENSE AND COPYRIGHT

Copyright 2012-2026 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.

=cut



( run in 0.889 second using v1.01-cache-2.11-cpan-39bf76dae61 )