% Stew4 User Manual
%
-% version 4.0
+% version 4.2
## What Is Stew ?
-...
+Stew is the database (SQL) tool with JDBC.
+
+For details, see "README.md".
## PRECAUTIONS
### Password Management
-...
+By defaults, passwords are not encrypted.
+Setting "Encryption" in the connector will encrypt the password.
-
-For details, see [How To Use - Connector Settings](#Connector-Settings).
+For details, see [How To Use - Configuration Of "Connector"](#configuration-of-connector).
### Rollback Does Not Work When The Connection Is Disconnecting
+By defaults, Rollback does not work automatically on disconnect.
+You have to care that some of DBMSs commit on disconnect.
-...
+Setting "Auto Rollback" in the connector will rollback automatically on disconnect.
-
-For details, see [How To Use - Connector Settings](#Connector-Settings).
+For details, see [How To Use - Configuration Of "Connector"](#configuration-of-connector).
### Other
For more information, see the project site.
-<http://stew.sourceforge.jp/>
-
-## Installation
+- <http://stew.sourceforge.jp/>
+- <http://argius.github.io/Stew4/>
-...
+## Installation
+Just extract the package archive file.
## Running App
# command line
$ stew --edit
+
# running stew
> --edit
...
-### -s - Executes file content as script (built-in)
+### -s - Executes file content as script (built-in) \<improved feature in version 4.1\>
+
+ > -s . | <SCRIPT FILE> | <SCRIPT-NAME> <SCRIPT-CODE>
+
+ 1. If the first argument is ".", the Script Context is reset.
+ 2. If the first argument is a filename with extension, the script language is identified by the extension, and the file is run as the script language's script.
+ 3. Otherwise, the first argument is recognized as the name of a script language, and the rest of arguments are executed as the script language's script.
- > -s <file>
+(Only the built-in JavaScript by file is supported in version 4.0.)
-( default=JavaScript )
+To use script languages except the built-in script language (JavaScript), it requires each script engine of script languages such as jruby, jython and groovy.
-The following variables will be available in the script:
+The Script Context keeps global scope bindings, and following scripts can reuse the bindings.
+If you want to reset Script Context, input " -s . " above.
- * object of current connection: connection, conn
- * object of Parameter: parameter, p
- * object of OutputProcessor: outputProcessor, op
+
+The following variables will be available in the script (global scope):
+
+ * the reference of current connection: connection, conn
+ * the reference of Parameter: parameter, p
+ * the reference of OutputProcessor: outputProcessor, op
### cd - Changes current directory (built-in)
Displays the paths of current directory and system directory.
+### ? - Displays System Properties (built-in)
+
+ > ? [<property-name> [<property-name-2> ... <property-name-n>]]
+
+Display System Properties. (System.getProperty)
+
+By defauts, it displays JRE, OS and Locale.
+
+ > ?
+ JRE : ...
+ OS : ...
+ Locale : en_UK
+ > ? java.version user.timezone zzz
+ java.version=[1.6.0_##]
+ user.timezone=[Europe/London]
+ zzz=undefined
+
+
### alias - Registers alias (built-in)
> alias [<name> [<command>]]
When If a parameter is specified, executes file content as SQL,
otherwise, two or more parameters, imports the file as data file.
The file format is automatically selected by file extension.
- *. .csv : CSV format
- *. .xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)
- *. otherwise: TSV format
+
+ * .csv : CSV format
+ * .xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)
+ * otherwise: TSV format
(implementation detail: this is basically same as import command,
executes as not batch but executes by record)
This command imports from file as data file.
The file format is automatically selected by file extension.
- *. .csv : CSV format
- *. .xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)
- *. otherwise: TSV format
+
+ * .csv : CSV format
+ * .xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)
+ * otherwise: TSV format
(implementation detail: this is basically same as load command,
but uses Statement#addBatch.)
This command exports result of command to the specified file.
The file format is automatically selected by file extension.
- *. .htm,html : HTML format
- *. .csv : CSV format
- *. .xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)
- *. others: TSV format
+
+ * .htm,html : HTML format
+ * .csv : CSV format
+ * .xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)
+ * others: TSV format
### time - Measures time to execute SQL
Downloaded. (size=18bytes, file=./emp/USA/145.txt)
Selected 42 records.
-When data exist a record, specified <data-column>,
-saves file to <root-dir> as file name.
+When data exist a record, specified <data-column>,
+saves file to <root-dir> as file name.
Saving file already exists or no permission to write file,
the process will abort immediately.
### wait - Waits for specified interval
- > wait seconds()
+ > wait seconds
-This command waits for the interval that specified number of seconds.
+This command waits for the interval that specified number (mixed decimal) of seconds.
It may be useful for executing multiple commands.
By default, the database info tree, the status bar and the find pane" are hidden.
-### Input/Output Area
+### Input/Output Area ( text area )
The I/O area is similar to CUI interface.
... Context menus for this component has the standard commands.
+### Paste Paths Into The Text Area Via DnD \<new feature in version 4.2\>
+
+When you drag and drop from file manager into the text area, the paths of these files will be pasted to the text area.
+It also allows plural files.
+
+
### Result Set Table
The result set table displays command results, usually query results from database.
Each node expands ...
+An "Auto-expansion" is a function to automatically expands nodes in the database info tree when connecting a database.
+If you use it, create a TSV file named "autoexpansion.tsv" in the system directory (.stew) and write node name lists as TSV into this file.
+
+
The context menu for this component are listed below:
: This command copies the full qualified name of selected nodes as text into the clipboard.
Refresh
-: This command ...
+: This command ...
Generate WHERE Phrase
-: This command generates a WHERE phrase consisting selected tables and columns ...
+: This command generates a WHERE phrase consisting selected tables and columns ...
selected same name, generate ...
Generate SELECT Statement (with WHERE)
: This command generates a SELECT statement with "WHERE" keyword.
Generate UPDATE Statement (with WHERE)
-: This command ...
+: This command ...
Generate INSERT Statement
-: This command ...
+: This command ...
Jump To Column By Name
: This command ... the name of selected node. Jump to the column which has the same name in current result table if found it.
...
-### Edit - Toggle focus (G) Ctrl-G
+### Edit - Toggle focus (G) Ctrl-G \<improved feature in version 4.2\>
-This command toggles focus between the result set table and the input/output area in a current window.
+This command toggles focus between the database info tree, the the result set table and the input/output area in a current window.
### Edit - Clear Message (M)
This command rotates command histories forward.
+### Command - Show All Histories(A) \<new feature in version 4.2\>
+
+This command shows all command histories and paste a choosen commmand.
+
+
### Command - Rollback (R)
This command displays confirm dialog and click "OK" to rollback.
There are following modes:
* None(N): Does nothing.
- * Focus(F): Focuses window.
+ * Focus(F): Focuses window.
* Shake(S): Shakes window.
* Blink(B): Blinks window.
### Command - Encryption Key (K)
-This command ...
+This command shows the dialog to input an encryption key.
### Command - Edit Connectors (E)
### Help - Show Help
This command shows this help file by default browser.
-This feature ...
### Help - About Stew