File Release Notes and Changelog
Release Name: 0.0.07
Notes:
README for dbishell
-------------------
--driver # DBIShell driver
--dsn # dsn [The bit after 'dbi:<DRIVER>:' ]
--user|u # database user name
--pass|passwd|password|p # database password
--help|h # print the help and exit
--shell-driver # real DBIShell driver to use if
# using driver=Proxy or driver=ODBC
--dotdir # location of your dbishell dotfiles
All of these are implemented to some extent, some might be problematic...
1) Commands must be terminated with a trailing /
Or, if you want to, you can configure it by setting the $EOL variable.
No, it can't default to ';', that would cause problems w. dr::Oracle.
So stop complaining already. [You know who you are]
2) Tab completion should be available. The mysql tab completer is reasonably
smart, the Oracle one will be once I get some more work done on it.
3)Special variables:
$FIELD_SEPARATOR
Contains the character sequence used to separate fields in output.
If unset, you get '|' as the separator.
$PRESCAN_FORMAT
If true, [cf. Perl "What is truth"] then the whole of the dataset
returned by all queries is prescanned, and the output formatted accordingly
This can be helpful when you have large columns which typically hold
values much shorter than they have the capacity for, since it shrinks
the display columns down to the size of the largest output value on a per
column basis. On the other hand, if you're fetching large numbers of rows,
This may hurt, since you'll be prefetching the whole dataset into memory,
scanning it, and then printing it.
$TRUNCATE_COLUMN_NAMES
If false, a column will never be narrower than its name in the output.
Othewise, column names will be shortened to fit their columns display
widths [if PRESCAN_ROWS is set]
$CASE_SENSITIVE
Is the DB case sensitive or not? [mainly effects tab completion]
$PAGER
The command to open a pipe to, to use as a pager. If $PAGER is unset,
$env:PAGER is tried instead, and if there's nothing there, 'less -S'
is used instead. If that doesn't work, then bad things probably
happen. Like paging not working, and maybe your output disappearing.
$PAGING
If this is true, then output from certain commands [just selects at
the moment] will be paged, depending on the value of $PAGE_SIZE and
$PRESCAN_FORMAT
$PAGE_SIZE
The number of rows above which dbishell will try to page output.
Paging is decided as follows:
If $PAGING is true, and $PRESCAN_FORMAT is true, output exceeding
$PAGE_SIZE [or exceeding the size of the terminal, if $PAGE_SIZE
is 0 or unset] will be paged.
If $PRESCAN_FORMAT is false, and $PAGING is true, then output will
be paged regardless of the amount of data returned, unless the DBI
driver can determine the number of rows before they are all fetched.
$EOL
The end of line character used by dbishell to determine when you want
a command executed. If unset [the default] then '/' is used.
[except that the '/' that terminates a comment will be ignored].
Otherwise, whatever you put in $EOL will be scanned for.
4) History:
Command history is stored in ~/.dbishell/<driver>.history
5) Examples:
dbishell --driver Oracle --dsn host=foobar\;sid=argh --user=scott
dbishell --driver mysql --dsn host=narf\;database=argh --user vivek
dbishell --driver Sybase --dsn hostname=narf\;database=argh --user=sa
dbishell --driver ODBC --dsn FOO: --shell-driver=Sybase --user sa
6) DSN strings
dbishell and DBI have slightly different views of the meaning of the
term 'DSN'.
DBI expects a DSN in the following forms:
dbi:DriverName:database_name
dbi:DriverName:database_name@hostname
dbi:DriverName:database_name~hostname!port
dbi:DriverName:database=database_name;host=hostname;port=port
(examples from DBI man page).
dbishell requires you to specify the driver seperately, and the
above examples would be handed as:
database_name
database_name@hostname
database_name~hostname!port
database_name;host=hostname;port=port
These strings would be arguments to the --dsn parameter, with the
actual database driver to use specified with --driver and --shell-driver.
The 'dbi' string is dropped, as it is implicit that if you are using
dbishell you are connecting to a dbi data source.
7) Help topics:
help
show
read
describe
interpolation
escaping
parameters
dbi_attr
environment
procedure_calls
logging
connect
disconnect
subshell
quit
Vivek Dasmohapatra <vivek@etla.org>
Changes:
2000-11-18 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell.pm (connect): added call to read_rc_script()
2000-10-30 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell.pm:
(exec_script): Altered file type checking to include the case
when we pass in a filehandle [was unchecked before]
(read_rc_script): Completed initial version of read_rc_script, not
yet tested or verified permision/mode checking
logic
* DBIShell/UTIL.pm: Added STAT_PERM_MASK and STAT_TYPE_MASK
2000-10-29 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell.pm:
(read_rc_script): added new function, not yet complete
* DBIShell/UTIL.pm: Added STAT_ constants and :stat export group
* DBIShell.pm:
(seqno): added monotonic sequence generator
(tmpfile): use seqno instead of $$ in tmpfile name
2000-10-28 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell.pm:
(set_dotdir): Added code to make <dotdir>/draft
directory for tmpfiles.
Haven't yet changed 'edit' command to
use this.
(tmpfile): added tmpfile method to return path to a tmpfile
(edit): made edit use tmpfile method rather than dotfile as
before.
2000-10-26 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/Sybase.pm (showables): added views to listing.
2000-10-05 Vivek Dasmohapatra <vivek@etla.org>
* dbishell/: Updated/wrote lots of documentation based on
stubs by Michael <michael@etla.org>
2000-10-03 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell.pm:
(exec_script): exec_script function didn't work with configurable
EOL before now. D'oh.
2000-10-03 Vivek Dasmohapatra <vivek@etla.org>
* CREDITS: added credits file
2000-10-02 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/Help.pm: copied across changes from README from
michael <michael@etla.org>
* README: applied patch from michael <michael@etla.org>
* ChangeLog: altered address from vivek@narf to vivek@etla.org
* Makefile (clean): added clean target to zap .cf.cache
* installer.pl: installer caches config answers in .cf.cache
* DBIShell.pm:
(parse_loop): use STDERR rather than STDOUT for xterm/dtterm
title control sequences
2000-10-01 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell.pm:
(new): LAST_TITLE data member added to DBIShell object
(): TITLE_FMT and WINDOWING constants added,
CTL_SET_TITLE imported from ::Term_CTL
(parse_loop): handle setting of xterm/rxvt titles.
(quit_cleanup): attempt to reset title to something sensible
I can't seem to retrieve the data returned by
the 'CSI 2 1 t' sequence in any way, so
just use somethingapproximately sensible.
* DBIShell/Term_CTL.pm: CTL_SET_TITLE sequence added
2000-09-20 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/DEFAULT.pm:
(COMPLETION_MAP): added entry for 'table'
* DBIShell/dr/Oracle.pm:
(COMPLETION_MAP): added entry for 'table'
* DBIShell/dr/Sybase.pm:
(describe): as below for _desc_tble in dr/Oracle.pm
(COMPLETION_MAP): added entry for 'table'
* DBIShell/dr/Oracle.pm:
(_desc_tble): deal w. types for which prec, scale and size are all 0
[ eg long: depict as 'long' rather than long(0) ]
(_desc_exec): ditto
2000-09-15 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/Sybase.pm:
(describe): cosmetic changes to output
* DBIShell/dr/MSSQL_A.pm:
(_init): BEGIN blocks not called during a require, apparently
changed BEGIN to _init
(new): added call to _init()
* DBIShell/dr/Oracle.pm:
(_desc_tble): cosmetic change to output format length
(_desc_trig): all_trigger_columns changed to all_trigger_cols
* DBIShell/dr/DEFAULT.pm:
(grep_objnames): added views back in since they are now separate
* DBIShell/dr/Sybase.pm: separated views/tables internally
(_views): added new method
* DBIShell/dr/DEFAULT.pm
(show): method now recognises views as a valid target
* DBIShell/dr/Oracle.pm:
(showables): added 'views' to list of showables
(_views): added method
(_tables): excluded views from this list
* DBIShell/dr/DEFAULT.pm:
(new): added placeholders for views, triggers, sequences
[cf tables and procs]
(grep_tabnames): separated tables and views in some internal
mechanisms, have to explicitly mention views
as well as tables in some places
2000-09-14 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/Oracle.pm:
(_desc_trig): added extra column info for trigger description
(untested)
* DBIShell/dr/MSSQL_A.pm: stripped out a lot of stuff that
could either safely be inherited
or was unused, simce the methods
that used it were inherited anyway
and therefore would not have seen it.
2000-09-13 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/MSSQL_A.pm: new driver added [it's just the
Sybase driver with all the placeholder
parameters disabled, since they don't seem
to work when contacting MSSQL via Sybase
OpenClient drivers]
2000-09-12 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/Oracle.pm:
(dump_def): recognize sequences and call _desc_seqn
(_dump_seqn): method to dump sequences added
(dump_def): replaced old _desc_seqn w. current _dump_seqn,
removed _dump_seqn [it was a describe rather than
a dump] and removed sequence support from show
[for now]
(_desc_trig): added a describe trigger method
(describe): call to _desc_trig added, now that I know what
the data in all_triggers means.
2000-09-11 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/DEFAULT.pm:
(show): slight changes to paging triger size tolerance
* DBIShell.pm:
(paging): was reading wrong terminal size parameter for paging
* DBIShell/dr/DEFAULT.pm:
(nonschema_grep): added code to respect case (in)sensetivity
* DBIShell.pm:
(is_terminated): recognise various one-line commands [those that
do not require a terminating EOL character]
and report them as such:
[license, help, spool, (dis)connect, edit, read, interpolate,
escape, quit, show, describe]
* DBIShell/dr/DEFAULT.pm:
(prescan_format): removed special handling of format calculation
for numeric felds, it was annoying.
* DBIShell.pm:
(is_terminated): handle case where user sets $EOL to \n
(new): added setvar for FIELD_SEPARATOR
* DBIShell/dr/mysql.pm: removed superfluous calls to $sh->paging()
* DBIShell/dr/Sybase.pm: removed superfluous calls to $sh->paging()
* DBIShell/dr/Oracle.pm: removed superfluous calls to $sh->paging()
* DBIShell/dr/DEFAULT.pm: removed superfluous calls to $sh->paging()
* DBIShell.pm:
(start_pager): added arg to function, incorporated call to ->paging
so separate call now redundant, prevented call
to pager while call already in progress.
2000-09-10 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell/dr/mysql.pm:
(interpret): added pager support
* DBIShell/dr/Sybase.pm:
(describe): added pager support
(dump_def): added pager/prescan support
* DBIShell/dr/Oracle.pm:
(_dump_exec): added pager/prescan support
(_dump_view): added pager support
(_desc_exec): added pager support
(_desc_tble): added pager support.
* DBIShell/dr/DEFAULT.pm:
(set_initvars): changed __PACKAGE__ to ref($engine), as method can
be inherited.
(show): added pager support to 'show' method.
(describe): added pager support to 'describe' method.
* DBIShell.pm:
(add_command): method to put commands onto editor history
(command): method to get commands from editor history
(pre_interpret): catch the 'edit' command
(edit): method to actually fire up an editor and execute
the result.
* DBIShell/Help.pm: updated w. EOL + PAGER info
* DBIShell.pm:
(start_pager): paging now controllable via PAGER, PAGING
and PAGE_SIZE variables.
(is_terminated): made EOL character configurable via EOL variable
(is_terminated): commented is_terminated function.
(parse_loop): strip user specified EOL from commands if EOL is set
2000-09-08 Vivek Dasmohapatra <vivek@etla.org>
* DBIShell.pm: added basic pager support, but not yet controllable
[you can change the pager, but paging is hardwired on]
* dbishell: removed message about email being unavailable
* Added TODO file
* Added Changelog file