% 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 <file>
+ > -s . | <SCRIPT FILE> | <SCRIPT-NAME> <SCRIPT-CODE>
-( default=JavaScript )
+ 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.
-The following variables will be available in the script:
+(Only the built-in JavaScript by file is supported in version 4.0.)
- * object of current connection: connection, conn
- * object of Parameter: parameter, p
- * object of OutputProcessor: outputProcessor, op
+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 Script Context keeps global scope bindings, and following scripts can reuse the bindings.
+If you want to reset Script Context, input " -s . " above.
+
+
+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)
> ?
JRE : ...
OS : ...
- Locale : ja_JP
+ Locale : en_UK
> ? java.version user.timezone zzz
- java.version=[1.6.0_##]\r
- user.timezone=[Europe/London]\r
- zzz=undefined\r
+ java.version=[1.6.0_##]
+ user.timezone=[Europe/London]
+ zzz=undefined
### alias - Registers alias (built-in)
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.
Each node expands ...
-An "Auto-expansion" is a function to automatically expands nodes in the database info tree when connecting a database.\r
+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.
: 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.