Mercurial > sqlpython
comparison docs/source/capabilities.rst @ 279:3c5fa8ed4f8b
improving help
author | catherine@Elli.myhome.westell.com |
---|---|
date | Thu, 19 Mar 2009 10:15:02 -0400 |
parents | f0f293d83337 |
children | 8ea39093ddf2 |
comparison
equal
deleted
inserted
replaced
278:c28fe53857da | 279:3c5fa8ed4f8b |
---|---|
1 SQLPython's extra capabilities | 1 SQLPython's extra capabilities |
2 ============================== | 2 ============================== |
3 | 3 |
4 For the most part, SQLPython simply duplicates SQL\*Plus's capabilites. | 4 For the most part, SQLPython simply duplicates SQL\*Plus's capabilites. |
5 | 5 |
6 Neatened output | |
7 =============== | |
8 | |
9 When printing query results, sqlpython economizes on screen space by allocating | |
10 only the width each column actually needs. | |
11 | |
12 Smart prompt | |
13 ============ | |
14 | |
15 sqlpython automatically uses `username`@`instance`> as its prompt, helping | |
16 avoid wrong-instance and wrong-user errors. | |
17 | |
18 Tab completion | |
19 ============== | |
20 | |
21 When typing SQL commands, hitting `<TAB>` after entering part of an object | |
22 or column name brings up a list of appropriate possibilities or, if there | |
23 is only one possibility, fills in the rest of the name. This feature is | |
24 not yet very reliable, but can save typing. | |
25 | |
26 Scripting | |
27 ========= | |
28 | |
29 Like SQL\*Plus, sqlpython can run scripts (text files with series of SQL and | |
30 sqlpython commands) with `@/path/to/script.sql` or (for online scripts) | |
31 `@http://scripthost/scriptlibrary/script.sql`. | |
32 | |
33 History | |
34 ======= | |
35 | |
36 The up- and down-arrow keys allow you to scroll through the lines entered so far | |
37 in your sqlpython session. | |
38 | |
39 Commands are also entered into a command history. | |
40 | |
41 `history` or `hi` | |
42 List entire command history | |
43 | |
44 `list` or `li` | |
45 List only last command | |
46 | |
47 `hi <N>` | |
48 List command number <N> from history. | |
49 | |
50 `hi <N>-`, `hi -<N>` | |
51 List commands from <N> onward, or up to <N> | |
52 | |
53 `hi <str>` | |
54 Lists commands that include the string <str> | |
55 | |
56 `hi /<regex>/` | |
57 Lists commands that match the regular expression <regex> | |
58 | |
59 `run`, `r`, or `\\g` | |
60 Run the most recent command again | |
61 | |
62 `run <N>` | |
63 Run command <N> | |
64 | |
65 `run <str>`, `run /<regex>/` | |
66 Run command matching <str> or <regex> (as for `history`) - | |
67 if multiple items would match, run most recent | |
68 | |
6 UNIX-like commands | 69 UNIX-like commands |
7 ================== | 70 ================== |
8 | 71 |
72 Many sqlpython commands allow you to act as though the database objects | |
73 were files in a UNIX filesystem. Many of the commands also accept flags | |
74 to modify their behavior. | |
75 | |
9 ls | 76 ls |
10 Lists objects from the data dictionaries. There are implied wildcards at the beginning and | 77 Lists objects from the data dictionaries, as though they were in a |
11 end | 78 *object_type*/*object_name* directory structure. Thus, `ls view/` |
79 lists all the user's views. | |
12 | 80 |
13 cat | 81 cat |
14 Shorthand for "SELECT * FROM" | 82 Shorthand for "SELECT * FROM" |
15 | 83 |
16 PostgreSQL-like shortcuts | 84 PostgreSQL-like shortcuts |