SQL::Shell 1.13 review

Download
by rbytes.net on

SQL::Shell is a command interpreter for DBI shells. SYNOPSIS use SQL::Shell; #Initialise and configu

License: Perl Artistic License
File size: 30K
Developer: John Alden
0 stars award from rbytes.net

SQL::Shell is a command interpreter for DBI shells.

SYNOPSIS

use SQL::Shell;

#Initialise and configure
my $sqlsh = new SQL::Shell(%settings);
$sqlsh->set($setting, $new_value);
$value = $sqlsh->get($setting);

#Interpret commands
$sqlsh->execute_command($command);
$sqlsh->run_script($filename);

SQL::Shell is a command-interpreter API for building shells and batch scripts. A command-line interface with readline support - sqlsh.pl - is included as part of the CPAN distribution. See < SQL::Shell::Manual > for a user guide.

SQL::Shell offers features similar to the mysql or sql*plus client programs but is database independent. The default command syntax is arguably more user-friendly than dbish not requiring any go, do or slashes to fire SQL statements at the database.

Here are some key features of "SQL Shell":
issuing common SQL statements by simply typing them
command history
listing drivers, datasources, tables
describing a table or the entire schema
dumping and loading data to/from delimited text files
character set conversion when loading data
logging of queries, results or all commands to file
a number of formats for display/logging data (sql, xml, delimited, boxed)
executing a series of commands from a file

You can also install custom commands, rendering formats and command history mechanisms. All the commands run by the interpreter are available via the API so if you don't like the default command syntax you can replace the command regexes with your own.

It's been developed and used in anger with Oracle and mysql but should work with any database with a DBD:: driver.

Requirements:
Perl

SQL::Shell 1.13 search tags