# HG changeset patch # User catherine@Elli.myhome.westell.com # Date 1237472102 14400 # Node ID 3c5fa8ed4f8b7da9fc094eb22aee284265b6062c # Parent c28fe53857da6df920daa1d00c321c40fde52ae2 improving help diff -r c28fe53857da -r 3c5fa8ed4f8b docs/source/capabilities.rst --- a/docs/source/capabilities.rst Thu Mar 19 00:02:11 2009 -0400 +++ b/docs/source/capabilities.rst Thu Mar 19 10:15:02 2009 -0400 @@ -3,12 +3,80 @@ For the most part, SQLPython simply duplicates SQL\*Plus's capabilites. +Neatened output +=============== + +When printing query results, sqlpython economizes on screen space by allocating +only the width each column actually needs. + +Smart prompt +============ + +sqlpython automatically uses `username`@`instance`> as its prompt, helping +avoid wrong-instance and wrong-user errors. + +Tab completion +============== + +When typing SQL commands, hitting `` after entering part of an object +or column name brings up a list of appropriate possibilities or, if there +is only one possibility, fills in the rest of the name. This feature is +not yet very reliable, but can save typing. + +Scripting +========= + +Like SQL\*Plus, sqlpython can run scripts (text files with series of SQL and +sqlpython commands) with `@/path/to/script.sql` or (for online scripts) +`@http://scripthost/scriptlibrary/script.sql`. + +History +======= + +The up- and down-arrow keys allow you to scroll through the lines entered so far +in your sqlpython session. + +Commands are also entered into a command history. + + `history` or `hi` + List entire command history + + `list` or `li` + List only last command + + `hi ` + List command number from history. + + `hi -`, `hi -` + List commands from onward, or up to + + `hi ` + Lists commands that include the string + + `hi //` + Lists commands that match the regular expression + + `run`, `r`, or `\\g` + Run the most recent command again + + `run ` + Run command + + `run `, `run //` + Run command matching or (as for `history`) - + if multiple items would match, run most recent + UNIX-like commands ================== +Many sqlpython commands allow you to act as though the database objects +were files in a UNIX filesystem. Many of the commands also accept flags +to modify their behavior. + ls - Lists objects from the data dictionaries. There are implied wildcards at the beginning and - end + Lists objects from the data dictionaries, as though they were in a + *object_type*/*object_name* directory structure. Thus, `ls view/` + lists all the user's views. cat Shorthand for "SELECT * FROM" @@ -51,4 +119,4 @@ SELECT Wild SQL can only be used in the primary column list of straightforward SELECT statements, -not in subqueries, `UNION`ed queries, etc. \ No newline at end of file +not in subqueries, `UNION`ed queries, etc.