Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / DBI::Shell.3
.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "DBI::Shell 3"
.TH DBI::Shell 3 "2002-10-01" "perl v5.8.0" "User Contributed Perl Documentation"
.SH "NAME"
DBI::Shell \- Interactive command shell for the DBI
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& perl -MDBI::Shell -e shell [<DBI data source> [<user> [<password>]]]
.Ve
.PP
or
.PP
.Vb 1
\& dbish [<DBI data source> [<user> [<password>]]]
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The DBI::Shell module (and dbish command, if installed) provide a
simple but effective command line interface for the Perl \s-1DBI\s0 module.
.PP
DBI::Shell is very new, very experimental and very subject to change.
Your milage \fIwill\fR vary. Interfaces \fIwill\fR change with each release.
.SH "TO DO"
.IX Header "TO DO"
Proper docs \- but not yet, too much is changing.
.PP
\&\*(L"/source file\*(R" command to read command file.
Allow to nest via stack of command file handles.
Add command log facility to create batch files.
.PP
Commands:
load (query?) from file
save (query?) to file
.PP
Use Data::ShowTable if available.
.PP
Define DBI::Shell plug-in semantics.
Implement import/export as plug-in module
.PP
Clarify meaning of batch mode
.PP
Completion hooks
.PP
Set/Get \s-1DBI\s0 handle attributes
.PP
Portability
.PP
Emulate popular command shell modes (Oracle, Ingres etc)?
.SH "COMMANDS"
.IX Header "COMMANDS"
Many commands \- few documented, yet!
.IP "help" 4
.IX Item "help"
.Vb 1
\& /help
.Ve
.IP "chistory" 4
.IX Item "chistory"
.Vb 2
\& /chistory (display history of all commands entered)
\& /chistory | YourPager (display history with paging)
.Ve
.IP "clear" 4
.IX Item "clear"
.Vb 1
\& /clear (Clears the current command buffer)
.Ve
.IP "commit" 4
.IX Item "commit"
.Vb 1
\& /commit (commit changes to the database)
.Ve
.IP "connect" 4
.IX Item "connect"
.Vb 3
\& /connect (pick from available drivers and sources)
\& /connect dbi:Oracle (pick source from based on driver)
\& /connect dbi:YourDriver:YourSource i.e. dbi:Oracle:mysid
.Ve
.Sp
Use this option to change userid or password.
.IP "current" 4
.IX Item "current"
.Vb 1
\& /current (Display current statement in the buffer)
.Ve
.IP "do" 4
.IX Item "do"
.Vb 1
\& /do (execute the current (non-select) statement)
.Ve
.Sp
.Vb 2
\& dbish> create table foo ( mykey integer )
\& dbish> /do
.Ve
.Sp
.Vb 1
\& dbish> truncate table OldTable /do (Oracle truncate)
.Ve
.IP "drivers" 4
.IX Item "drivers"
.Vb 1
\& /drivers (Display available DBI drivers)
.Ve
.IP "edit" 4
.IX Item "edit"
.Vb 1
\& /edit (Edit current statement in an external editor)
.Ve
.Sp
Editor is defined using the enviroment variable \f(CW$VISUAL\fR or
\&\f(CW$EDITOR\fR or default is vi. Use /option editor=new editor to change
in the current session.
.Sp
To read a file from the operating system invoke the editor (/edit)
and read the file into the editor buffer.
.IP "exit" 4
.IX Item "exit"
.Vb 1
\& /exit (Exits the shell)
.Ve
.IP "get" 4
.IX Item "get"
.Vb 1
\& /get (Retrieve a previous command to the current buffer)
.Ve
.IP "go" 4
.IX Item "go"
.Vb 1
\& /go (Execute the current statement)
.Ve
.Sp
Run (execute) the statement in the current buffer. This is the default
action if the statement ends with /
.Sp
.Vb 1
\& dbish> select * from user_views/
.Ve
.Sp
.Vb 3
\& dbish> select table_name from user_tables
\& dbish> where table_name like 'DSP%'
\& dbish> /
.Ve
.Sp
.Vb 1
\& dbish> select table_name from all_tables/ | more
.Ve
.IP "history" 4
.IX Item "history"
.Vb 2
\& /history (Display combined command and result history)
\& /history | more
.Ve
.IP "option" 4
.IX Item "option"
.Vb 4
\& /option [option1[=value]] [option2 ...]
\& /option (Displays the current options)
\& /option MyOption (Displays the value, if exists, of MyOption)
\& /option MyOption=4 (defines and/or sets value for MyOption)
.Ve
.IP "perl" 4
.IX Item "perl"
.Vb 1
\& /perl (Evaluate the current statement as perl code)
.Ve
.IP "quit" 4
.IX Item "quit"
.Vb 1
\& /quit (Leaves shell. Same as exit)
.Ve
.IP "redo" 4
.IX Item "redo"
.Vb 1
\& /redo (Re-execute the previously executed statement)
.Ve
.IP "rhistory" 4
.IX Item "rhistory"
.Vb 1
\& /rhistory (Display result history)
.Ve
.IP "rollback" 4
.IX Item "rollback"
.Vb 1
\& /rollback (rollback changes to the database)
.Ve
.Sp
For this to be useful, turn the autocommit off. /option autocommit=0
.IP "table_info" 4
.IX Item "table_info"
.Vb 2
\& /table_info (display all tables that exist in current database)
\& /table_info | more (for paging)
.Ve
.IP "trace" 4
.IX Item "trace"
.Vb 1
\& /trace (set DBI trace level for current database)
.Ve
.Sp
Adjust the trace level for \s-1DBI\s0 0 \- 4. 0 off. 4 is lots of information.
Useful for determining what is really happening in \s-1DBI\s0. See \s-1DBI\s0.
.IP "type_info" 4
.IX Item "type_info"
.Vb 1
\& /type_info (display data types supported by current server)
.Ve
.SH "AUTHORS and ACKNOWLEDGEMENTS"
.IX Header "AUTHORS and ACKNOWLEDGEMENTS"
The DBI::Shell has a long lineage.
.PP
It started life around 1994\-1997 as the pmsql script written by Andreas
König. Jochen Wiedmann picked it up and ran with it (adding much along
the way) as \fIdbimon\fR, bundled with his DBD::mSQL driver modules. In
1998, around the time I wanted to bundle a shell with the \s-1DBI\s0, Adam
Marks was working on a dbish modeled after the Sybase sqsh utility.
.PP
Wanting to start from a cleaner slate than the feature-full but complex
dbimon, I worked with Adam to create a fairly open modular and very
configurable DBI::Shell module. Along the way Tom Lowery chipped in
ideas and patches. As we go further along more useful code and concepts
from Jochen's dbimon is bound to find it's way back in.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
The DBI::Shell module is Copyright (c) 1998 Tim Bunce. England.
All rights reserved. Portions are Copyright by Jochen Wiedmann,
Adam Marks and Tom Lowery.
.PP
You may distribute under the terms of either the \s-1GNU\s0 General Public
License or the Artistic License, as specified in the Perl \s-1README\s0 file.