OSDN Git Service

Upgrade to 4.2.0
[stew/Stew4.git] / MANUAL.html
1 <!DOCTYPE html>\r
2 <html>\r
3 <head>\r
4   <meta charset="utf-8">\r
5   <meta name="generator" content="pandoc">\r
6   <title>Stew4 User Manual</title>\r
7   <!--[if lt IE 9]>\r
8     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>\r
9   <![endif]-->\r
10   <link rel="stylesheet" href="markdown.css">\r
11 </head>\r
12 <body>\r
13 <header>\r
14 <h1 class="title">Stew4 User Manual</h1>\r
15 <h3 class="date">version 4.2</h3>\r
16 </header>\r
17 <nav id="TOC">\r
18 <ul>\r
19 <li><a href="#what-is-stew">What Is Stew ?</a></li>\r
20 <li><a href="#precautions">PRECAUTIONS</a><ul>\r
21 <li><a href="#password-management">Password Management</a></li>\r
22 <li><a href="#rollback-does-not-work-when-the-connection-is-disconnecting">Rollback Does Not Work When The Connection Is Disconnecting</a></li>\r
23 <li><a href="#other">Other</a></li>\r
24 </ul></li>\r
25 <li><a href="#installation">Installation</a></li>\r
26 <li><a href="#running-app">Running App</a></li>\r
27 <li><a href="#uninstallation">Uninstallation</a></li>\r
28 <li><a href="#usage">Usage</a><ul>\r
29 <li><a href="#configuration-of-connector">Configuration Of &quot;Connector&quot;</a></li>\r
30 <li><a href="#about-password-management">About Password Management</a></li>\r
31 <li><a href="#anonymous-connector">Anonymous Connector</a></li>\r
32 <li><a href="#interactive-mode">Interactive Mode</a></li>\r
33 <li><a href="#non-interactive-mode">Non-interactive Mode</a></li>\r
34 <li><a href="#alias">Alias</a></li>\r
35 </ul></li>\r
36 <li><a href="#commands">Commands</a><ul>\r
37 <li><a href="#connect---connects-to-database-built-in">connect - Connects to database (built-in)</a></li>\r
38 <li><a href="#disconnect---disconnects-from-database-built-in">disconnect - Disconnects from database (built-in)</a></li>\r
39 <li><a href="#commit---commits-current-transaction-built-in">commit - Commits current transaction (built-in)</a></li>\r
40 <li><a href="#rollback---rollbacks-current-transaction-built-in">rollback - Rollbacks current transaction (built-in)</a></li>\r
41 <li><a href="#e---evaluates-multiple-commands-built-in">-e - Evaluates multiple commands (built-in)</a></li>\r
42 <li><a href="#f---executes-file-content-as-command-built-in">-f - Executes file content as command (built-in)</a></li>\r
43 <li><a href="#s---executes-file-content-as-script-built-in-improved-feature-in-version-4.1">-s - Executes file content as script (built-in) &lt;improved feature in version 4.1&gt;</a></li>\r
44 <li><a href="#cd---changes-current-directory-built-in">cd - Changes current directory (built-in)</a></li>\r
45 <li><a href="#displays-directories-built-in">@ - Displays directories (built-in)</a></li>\r
46 <li><a href="#displays-system-properties-built-in">? - Displays System Properties (built-in)</a></li>\r
47 <li><a href="#alias---registers-alias-built-in">alias - Registers alias (built-in)</a></li>\r
48 <li><a href="#unalias---removes-alias-built-in">unalias - Removes alias (built-in)</a></li>\r
49 <li><a href="#exit---exits-application-built-in">exit - Exits application (built-in)</a></li>\r
50 <li><a href="#load---executes-file-content-as-sql">load - Executes file content as SQL</a></li>\r
51 <li><a href="#import---imports-from-file">import - Imports from file</a></li>\r
52 <li><a href="#export---exports-to-file">export - Exports to file</a></li>\r
53 <li><a href="#time---measures-time-to-execute-sql">time - Measures time to execute SQL</a></li>\r
54 <li><a href="#find---finds-table-names">find - Finds table names</a></li>\r
55 <li><a href="#report---reports-database-info">report - Reports database info</a></li>\r
56 <li><a href="#download---downloads-a-column-as-file">download - Downloads a column as file</a></li>\r
57 <li><a href="#upload---uploads-file-data-to-a-column">upload - Uploads file data to a column</a></li>\r
58 <li><a href="#wait---waits-for-specified-interval">wait - Waits for specified interval</a></li>\r
59 </ul></li>\r
60 <li><a href="#the-gui-mode">The GUI Mode</a><ul>\r
61 <li><a href="#common-behaviors">Common Behaviors</a></li>\r
62 <li><a href="#main-window">Main Window</a></li>\r
63 <li><a href="#inputoutput-area-text-area">Input/Output Area ( text area )</a></li>\r
64 <li><a href="#paste-paths-into-the-text-area-via-dnd-new-feature-in-version-4.2">Paste Paths Into The Text Area Via DnD &lt;new feature in version 4.2&gt;</a></li>\r
65 <li><a href="#result-set-table">Result Set Table</a></li>\r
66 <li><a href="#database-info-tree">Database Info Tree</a></li>\r
67 <li><a href="#main-menu">Main Menu</a></li>\r
68 <li><a href="#status-bar">Status Bar</a></li>\r
69 <li><a href="#saving-configuration">Saving Configuration</a></li>\r
70 <li><a href="#key-binding">Key Binding</a></li>\r
71 </ul></li>\r
72 <li><a href="#menus-in-the-gui-mode">Menus in the GUI Mode</a><ul>\r
73 <li><a href="#file---new-window-n-ctrl-n">File - New Window (N) Ctrl-N</a></li>\r
74 <li><a href="#file---close-window-c-ctrl-w">File - Close Window (C) Ctrl-W</a></li>\r
75 <li><a href="#file---quit-q-ctrl-q">File - Quit (Q) Ctrl-Q</a></li>\r
76 <li><a href="#edit---cut-t-ctrl-x">Edit - Cut (T) Ctrl-X</a></li>\r
77 <li><a href="#edit---copy-c-ctrl-c">Edit - Copy (C) Ctrl-C</a></li>\r
78 <li><a href="#edit---paste-p-ctrl-v">Edit - Paste (P) Ctrl-V</a></li>\r
79 <li><a href="#edit---select-all-a-ctrl-a">Edit - Select All (A) Ctrl-A</a></li>\r
80 <li><a href="#edit---find-f-ctrl-f">Edit - Find (F) Ctrl-F</a></li>\r
81 <li><a href="#edit---toggle-focus-g-ctrl-g-improved-feature-in-version-4.2">Edit - Toggle focus (G) Ctrl-G &lt;improved feature in version 4.2&gt;</a></li>\r
82 <li><a href="#edit---clear-message-m">Edit - Clear Message (M)</a></li>\r
83 <li><a href="#view---show-status-bar-s">View - Show Status Bar (S)</a></li>\r
84 <li><a href="#view---show-column-number-c">View - Show Column Number (C)</a></li>\r
85 <li><a href="#view---show-info-tree-i">View - Show Info Tree (I)</a></li>\r
86 <li><a href="#view---always-on-top-t">View - Always On Top (T)</a></li>\r
87 <li><a href="#view---refresh-r-f5">View - Refresh (R) F5</a></li>\r
88 <li><a href="#view---widen-column-width-w-ctrl-.period">View - Widen Column Width (W) Ctrl-.(period)</a></li>\r
89 <li><a href="#view---narrow-column-width-n-ctrl-comma">View - Narrow Column Width (N) Ctrl-,(comma)</a></li>\r
90 <li><a href="#view---adjust-column-width-a-ctrl-slash">View - Adjust Column Width (A) Ctrl-/(slash)</a></li>\r
91 <li><a href="#view---auto-adjust-mode-m">View - Auto Adjust Mode (M)</a></li>\r
92 <li><a href="#command---execute-x-ctrl-m">Command - Execute (X) Ctrl-M</a></li>\r
93 <li><a href="#command---break-b-ctrl-pausebreak">Command - BREAK (B) Ctrl-Pause(Break)</a></li>\r
94 <li><a href="#command---history-back-p-ctrl-up">Command - History Back (P) Ctrl-Up</a></li>\r
95 <li><a href="#command---history-next-n-ctrl-down">Command - History Next (N) Ctrl-Down</a></li>\r
96 <li><a href="#command---show-all-historiesa-new-feature-in-version-4.2">Command - Show All Histories(A) &lt;new feature in version 4.2&gt;</a></li>\r
97 <li><a href="#command---rollback-r">Command - Rollback (R)</a></li>\r
98 <li><a href="#command---commit-m">Command - Commit (M)</a></li>\r
99 <li><a href="#command---connect-c-ctrl-e">Command - Connect (C) Ctrl-E</a></li>\r
100 <li><a href="#command---disconnect-d-ctrl-d">Command - Disconnect (D) Ctrl-D</a></li>\r
101 <li><a href="#command---post-proccess-0">Command - Post-Proccess (0)</a></li>\r
102 <li><a href="#command---encryption-key-k">Command - Encryption Key (K)</a></li>\r
103 <li><a href="#command---edit-connectors-e">Command - Edit Connectors (E)</a></li>\r
104 <li><a href="#data---sort-s-alt-s">Data - Sort (S) Alt-S</a></li>\r
105 <li><a href="#data---import-file-i">Data - Import File (I)</a></li>\r
106 <li><a href="#data---export-file-e-ctrl-shift-s">Data - Export File (E) Ctrl-Shift-S</a></li>\r
107 <li><a href="#help---show-help">Help - Show Help</a></li>\r
108 <li><a href="#help---about-stew">Help - About Stew</a></li>\r
109 </ul></li>\r
110 <li><a href="#properties">Properties</a><ul>\r
111 <li><a href="#net.argius.stew.properties---location-of-properties-file">net.argius.stew.properties - Location Of Properties File</a></li>\r
112 <li><a href="#net.argius.stew.directory---working-directory">net.argius.stew.directory - Working Directory</a></li>\r
113 <li><a href="#net.argius.stew.query.timeout---query-timeout">net.argius.stew.query.timeout - Query Timeout</a></li>\r
114 <li><a href="#net.argius.stew.rowcount.limit---limit-of-display-result-row-count">net.argius.stew.rowcount.limit - Limit Of Display Result Row Count</a></li>\r
115 <li><a href="#net.argius.stew.command.import.batch.limit---limit-of-import-command-using-batch">net.argius.stew.command.Import.batch.limit - Limit Of Import Command Using Batch</a></li>\r
116 <li><a href="#net.argius.stew.ui.window.resident---regident">net.argius.stew.ui.window.resident - Regident</a></li>\r
117 <li><a href="#logger-configurations">Logger Configurations</a></li>\r
118 </ul></li>\r
119 </ul>\r
120 </nav>\r
121 <h2 id="what-is-stew"><a href="#TOC">What Is Stew ?</a></h2>\r
122 <p>Stew is the database (SQL) tool with JDBC.</p>\r
123 <p>For details, see &quot;README.md&quot;.</p>\r
124 <h2 id="precautions"><a href="#TOC">PRECAUTIONS</a></h2>\r
125 <h3 id="password-management"><a href="#TOC">Password Management</a></h3>\r
126 <p>By defaults, passwords are not encrypted. Setting &quot;Encryption&quot; in the connector will encrypt the password.</p>\r
127 <p>For details, see <a href="#configuration-of-connector">How To Use - Configuration Of &quot;Connector&quot;</a>.</p>\r
128 <h3 id="rollback-does-not-work-when-the-connection-is-disconnecting"><a href="#TOC">Rollback Does Not Work When The Connection Is Disconnecting</a></h3>\r
129 <p>By defaults, Rollback does not work automatically on disconnect. You have to care that some of DBMSs commit on disconnect.</p>\r
130 <p>Setting &quot;Auto Rollback&quot; in the connector will rollback automatically on disconnect.</p>\r
131 <p>For details, see <a href="#configuration-of-connector">How To Use - Configuration Of &quot;Connector&quot;</a>.</p>\r
132 <h3 id="other"><a href="#TOC">Other</a></h3>\r
133 <p>For more information, see the project site.</p>\r
134 <ul>\r
135 <li><a href="http://stew.sourceforge.jp/"><code class="url">http://stew.sourceforge.jp/</code></a></li>\r
136 <li><a href="http://argius.github.io/Stew4/"><code class="url">http://argius.github.io/Stew4/</code></a></li>\r
137 </ul>\r
138 <h2 id="installation"><a href="#TOC">Installation</a></h2>\r
139 <p>Just extract the package archive file.</p>\r
140 <h2 id="running-app"><a href="#TOC">Running App</a></h2>\r
141 <p>If you want to use GUI mode, execute the following command:</p>\r
142 <pre><code>&gt; java -jar stew.jar --gui</code></pre>\r
143 <p>If you want to use CUI mode, execute the following command:</p>\r
144 <pre><code>&gt; java -jar stew.jar --cui</code></pre>\r
145 <p>At first time, a system directory &quot;.stew&quot; created. It is used by some configurations. By default, &quot;.stew&quot; creates at the current directory.</p>\r
146 <h2 id="uninstallation"><a href="#TOC">Uninstallation</a></h2>\r
147 <p>Remove all of installed files and &quot;.stew&quot; directory.</p>\r
148 <hr>\r
149 <h2 id="usage"><a href="#TOC">Usage</a></h2>\r
150 <p>To access database with Stew, you need DBMS that supports JDBC and its JDBC driver. For details, see the manual of DBMS.</p>\r
151 <h3 id="configuration-of-connector"><a href="#TOC">Configuration Of &quot;Connector&quot;</a></h3>\r
152 <p>In Stew, an asset of JDBC Connection called it &quot;Connector&quot;.</p>\r
153 <p>In CUI mode, to start edit tool, specifies --edit option.</p>\r
154 <pre><code># command line\r
155 $ stew --edit\r
156 \r
157 # running stew\r
158 &gt; --edit</code></pre>\r
159 <p>In GUI mode, executes &quot;Edit Connectors&quot; to start edit dialog.</p>\r
160 <p>Connector has the following properties:</p>\r
161 <dl>\r
162 <dt>Connector ID</dt>\r
163 <dd><p>ID for connector command. Allows only ASCII letters (A-Za-z0-9).</p>\r
164 </dd>\r
165 <dt>Connector Name</dt>\r
166 <dd><p>The name to display at Prompt.</p>\r
167 </dd>\r
168 <dt>Classpath</dt>\r
169 <dd><p>Specifies classpath of JDBC driver. This form is same with -CLASSPATH option.</p>\r
170 </dd>\r
171 <dt>Driver</dt>\r
172 <dd><p>Specifies the driver class that implements java.sql.Driver. (In GUI mode, you can use the &quot;search Driver&quot; button.)</p>\r
173 </dd>\r
174 <dt>URL to connect</dt>\r
175 <dd><p>Specifies JDBC URL (same as url at DriverManager.getConnection(url)).</p>\r
176 </dd>\r
177 <dt>User</dt>\r
178 <dd><p>Specifies the user ID.</p>\r
179 </dd>\r
180 <dt>Password</dt>\r
181 <dd><p>Specifies the password of its user ID.</p>\r
182 </dd>\r
183 <dt>Encryption</dt>\r
184 <dd><p>Specifies the type to save password into file. See the next section.</p>\r
185 </dd>\r
186 <dt>Readonly</dt>\r
187 <dd>Is set to READONLY the connection, so that you can not run the commands that update.\r
188 </dd>\r
189 </dl>\r
190 <p>(., Which according to ReadOnly the command side)</p>\r
191 <dl>\r
192 <dt>Auto Rollback</dt>\r
193 <dd>If it was set, the transaction will be rollbacked automatically when disconnect.\r
194 </dd>\r
195 </dl>\r
196 <h3 id="about-password-management"><a href="#TOC">About Password Management</a></h3>\r
197 <p>How to save the password, you can select the encryption process.</p>\r
198 <dl>\r
199 <dt>PlainTextPassword</dt>\r
200 <dd><p>Saves as plain text. (default)</p>\r
201 </dd>\r
202 <dt>PbePassword</dt>\r
203 <dd><p>You can store your password by using the PBE encryption.</p>\r
204 </dd>\r
205 </dl>\r
206 <h3 id="anonymous-connector"><a href="#TOC">Anonymous Connector</a></h3>\r
207 <h3 id="interactive-mode"><a href="#TOC">Interactive Mode</a></h3>\r
208 <h3 id="non-interactive-mode"><a href="#TOC">Non-interactive Mode</a></h3>\r
209 <h3 id="alias"><a href="#TOC">Alias</a></h3>\r
210 <h2 id="commands"><a href="#TOC">Commands</a></h2>\r
211 <h3 id="connect---connects-to-database-built-in"><a href="#TOC">connect - Connects to database (built-in)</a></h3>\r
212 <pre><code>&gt; connect &lt;connector-id&gt;\r
213 &gt; -c &lt;connector-id&gt;</code></pre>\r
214 <p>This command connects to database with prepared Connector.</p>\r
215 <p>In interactive mode, connection is kept until disconnect. If already connected, disconnect it first, then connect.</p>\r
216 <h3 id="disconnect---disconnects-from-database-built-in"><a href="#TOC">disconnect - Disconnects from database (built-in)</a></h3>\r
217 <pre><code>&gt; disconnect\r
218 &gt; -d</code></pre>\r
219 <p>This command disconnects from database.</p>\r
220 <p>If auto-rollback was available, try to rollback before disconnecting.</p>\r
221 <h3 id="commit---commits-current-transaction-built-in"><a href="#TOC">commit - Commits current transaction (built-in)</a></h3>\r
222 <p>This command commits current transaction.</p>\r
223 <p>** caution: Commit cannot cancel. Please use carefully. **</p>\r
224 <h3 id="rollback---rollbacks-current-transaction-built-in"><a href="#TOC">rollback - Rollbacks current transaction (built-in)</a></h3>\r
225 <p>This command rollbacks a current transaction.</p>\r
226 <h3 id="e---evaluates-multiple-commands-built-in"><a href="#TOC">-e - Evaluates multiple commands (built-in)</a></h3>\r
227 <pre><code>&gt; -e &lt;command&gt; -e &lt;command&gt; ...</code></pre>\r
228 <p>For example, you can execute two export command continuously, or can execute as batch in non-interactive mode.</p>\r
229 <h3 id="f---executes-file-content-as-command-built-in"><a href="#TOC">-f - Executes file content as command (built-in)</a></h3>\r
230 <pre><code>&gt; -f &lt;file&gt;</code></pre>\r
231 <p>...</p>\r
232 <h3 id="s---executes-file-content-as-script-built-in-improved-feature-in-version-4.1"><a href="#TOC">-s - Executes file content as script (built-in) &lt;improved feature in version 4.1&gt;</a></h3>\r
233 <pre><code>&gt; -s . | &lt;SCRIPT FILE&gt; | &lt;SCRIPT-NAME&gt; &lt;SCRIPT-CODE&gt;</code></pre>\r
234 <ol type="1">\r
235 <li>If the first argument is &quot;.&quot;, the Script Context is reset.</li>\r
236 <li>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.</li>\r
237 <li>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.</li>\r
238 </ol>\r
239 <p>(Only the built-in JavaScript by file is supported in version 4.0.)</p>\r
240 <p>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.</p>\r
241 <p>The Script Context keeps global scope bindings, and following scripts can reuse the bindings. If you want to reset Script Context, input &quot; -s . &quot; above.</p>\r
242 <p>The following variables will be available in the script (global scope):</p>\r
243 <ul>\r
244 <li>the reference of current connection: connection, conn</li>\r
245 <li>the reference of Parameter: parameter, p</li>\r
246 <li>the reference of OutputProcessor: outputProcessor, op</li>\r
247 </ul>\r
248 <h3 id="cd---changes-current-directory-built-in"><a href="#TOC">cd - Changes current directory (built-in)</a></h3>\r
249 <pre><code>&gt; cd &lt;directory&gt;</code></pre>\r
250 <p>Changes current directory to specified one. (This current directory is not OS's, but internal Stew.)</p>\r
251 <h3 id="displays-directories-built-in"><a href="#TOC">@ - Displays directories (built-in)</a></h3>\r
252 <pre><code>&gt; @</code></pre>\r
253 <p>Displays the paths of current directory and system directory.</p>\r
254 <h3 id="displays-system-properties-built-in"><a href="#TOC">? - Displays System Properties (built-in)</a></h3>\r
255 <pre><code>&gt; ? [&lt;property-name&gt; [&lt;property-name-2&gt; ... &lt;property-name-n&gt;]]</code></pre>\r
256 <p>Display System Properties. (System.getProperty)</p>\r
257 <p>By defauts, it displays JRE, OS and Locale.</p>\r
258 <pre><code>&gt; ?\r
259 JRE : ...\r
260 OS : ...\r
261 Locale : en_UK\r
262 &gt; ? java.version user.timezone zzz\r
263 java.version=[1.6.0_##]\r
264 user.timezone=[Europe/London]\r
265 zzz=undefined</code></pre>\r
266 <h3 id="alias---registers-alias-built-in"><a href="#TOC">alias - Registers alias (built-in)</a></h3>\r
267 <pre><code>&gt; alias [&lt;name&gt; [&lt;command&gt;]]</code></pre>\r
268 <p>Registers the alias of command. When called with an argument, display the alias and its command. When called without arguments, display all aliases.</p>\r
269 <p>Before registering or displaying, refreshes cached info in memory. If modified aliases in another process, includes you directly edit the config file, run this command.</p>\r
270 <p>(implementation details: for the infinite loop suppression of circular references, the depth of the expansion up to 100.)</p>\r
271 <pre><code>&gt; alias\r
272 No aliases.\r
273 &gt; alias search select * from\r
274 &gt; alias count select count(*) from\r
275 &gt; alias search\r
276 alias search=[select * from]\r
277 &gt; search table1\r
278 &gt;&gt; select * from table1\r
279 (diplays the results of &quot;select * from table1&quot;)\r
280 &gt;</code></pre>\r
281 <h3 id="unalias---removes-alias-built-in"><a href="#TOC">unalias - Removes alias (built-in)</a></h3>\r
282 <pre><code>&gt; unalias &lt;alias&gt;</code></pre>\r
283 <p>If the specified alias does not exist, does nothing. Whether the target exists or not, refreshes cached info in memory.</p>\r
284 <h3 id="exit---exits-application-built-in"><a href="#TOC">exit - Exits application (built-in)</a></h3>\r
285 <pre><code>&gt; exit</code></pre>\r
286 <p>This command exits Stew without confirmation.</p>\r
287 <p>All connections will be disconnected automatically. Rollback will do only the connector set auto-rollback option. For automatic rollback, see <a href="#configuration-of-connector">Usage - Configuration Of &quot;Connector&quot;</a>.</p>\r
288 <h3 id="load---executes-file-content-as-sql"><a href="#TOC">load - Executes file content as SQL</a></h3>\r
289 <pre><code>&gt; load [&lt;SQL-file&gt; | &lt;data-file&gt; &lt;table-name&gt; [ HEADER ]]</code></pre>\r
290 <p>This command executes the SQL read from specified file.</p>\r
291 <p>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.</p>\r
292 <ul>\r
293 <li>.csv : CSV format</li>\r
294 <li>.xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)</li>\r
295 <li>otherwise: TSV format</li>\r
296 </ul>\r
297 <p>(implementation detail: this is basically same as import command, executes as not batch but executes by record)</p>\r
298 <h3 id="import---imports-from-file"><a href="#TOC">import - Imports from file</a></h3>\r
299 <pre><code>import &lt;data-file&gt; &lt;table-name&gt; [ HEADER ]</code></pre>\r
300 <p>This command imports from file as data file. The file format is automatically selected by file extension.</p>\r
301 <ul>\r
302 <li>.csv : CSV format</li>\r
303 <li>.xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)</li>\r
304 <li>otherwise: TSV format</li>\r
305 </ul>\r
306 <p>(implementation detail: this is basically same as load command, but uses Statement#addBatch.)</p>\r
307 <h3 id="export---exports-to-file"><a href="#TOC">export - Exports to file</a></h3>\r
308 <p>This command exports result of command to the specified file. The file format is automatically selected by file extension.</p>\r
309 <ul>\r
310 <li>.htm,html : HTML format</li>\r
311 <li>.csv : CSV format</li>\r
312 <li>.xml : XML format (definition: src/net/argius/stew/io/stew-table.dtd)</li>\r
313 <li>others: TSV format</li>\r
314 </ul>\r
315 <h3 id="time---measures-time-to-execute-sql"><a href="#TOC">time - Measures time to execute SQL</a></h3>\r
316 <pre><code>&gt; time [&lt;count&gt;] &lt;SQL&gt;</code></pre>\r
317 <p>This command executes specified SQL and measures its execution time.</p>\r
318 <p>If specified count, executes SQL by count continuously and summaries &quot;Total&quot;, &quot;Ave(average)&quot;, &quot;Max&quot; and &quot;Min&quot;. Otherwise, executes once and measure its execution time.</p>\r
319 <pre><code>&gt; time select * from EMPLOYEE\r
320 execution time: 0.093 seconds\r
321 &gt; time 100 select * from EMPLOYEE\r
322 Total: 0.484 seconds\r
323   Ave: 0.005 seconds\r
324   Max: 0.094 seconds\r
325   Min: 0.000 seconds\r
326 &gt;</code></pre>\r
327 <h3 id="find---finds-table-names"><a href="#TOC">find - Finds table names</a></h3>\r
328 <pre><code>&gt; find &lt;table-name-pattern&gt; [&lt;table-type-pattern&gt; [&lt;schema-pattern&gt; [&lt;catalog-pattern&gt; [ FULL ]]]]</code></pre>\r
329 <p>This command displays list of tables allowed to show. The parameter including &quot;pattern&quot; in its name can be specified wildcard (#,?).</p>\r
330 <h3 id="report---reports-database-info"><a href="#TOC">report - Reports database info</a></h3>\r
331 <pre><code>&gt; report - | &lt;table-name&gt; [ FULL | PK | INDEX ]</code></pre>\r
332 <p>This command displays the info about current connection and connecting database.</p>\r
333 <p>If specifies - (hyphen), displays the name and version of database and JDBC driver, user and JDBC address.</p>\r
334 <p>If only specifies table name, displays the column info about specified table.</p>\r
335 <p>If specifies table name and option, displays the primary key or index info about specified table.</p>\r
336 <h3 id="download---downloads-a-column-as-file"><a href="#TOC">download - Downloads a column as file</a></h3>\r
337 <pre><code>&gt; download &lt;root-dir&gt; SELECT &lt;data-column&gt; [, file-path...] FROM ...</code></pre>\r
338 <p>This command downloads a column data by rows and saves to file.</p>\r
339 <p>For any data type. It is useful for downloading large text data or large objects (BLOB, CLOB) all at once.</p>\r
340 <p>In order to be able to download multiple files, generates file name using column data.</p>\r
341 <p>The file name will be generated by concatenate second column and after as string. This supporses to specify primary keys and file extension.</p>\r
342 <pre><code>&gt; download emp select FULL_NAME, JOB_COUNTRY, &#39;/&#39;, EMP_NO, &#39;.txt&#39; from EMPLOYEE\r
343 The dir[./emp/USA] was created.\r
344 Downloaded. (size=14bytes, file=./emp/USA/2.txt)\r
345 Downloaded. (size=12bytes, file=./emp/USA/4.txt)\r
346  .\r
347  .\r
348  .\r
349 Downloaded. (size=12bytes, file=./emp/USA/24.txt)\r
350 The dir[./emp/England] was created.\r
351 Downloaded. (size=11bytes, file=./emp/England/28.txt)\r
352  .\r
353  .\r
354  .\r
355 Downloaded. (size=18bytes, file=./emp/USA/145.txt)\r
356 Selected 42 records.</code></pre>\r
357 <p>When data exist a record, specified &lt;data-column&gt;, saves file to &lt;root-dir&gt; as file name.</p>\r
358 <p>Saving file already exists or no permission to write file, the process will abort immediately.</p>\r
359 <h3 id="upload---uploads-file-data-to-a-column"><a href="#TOC">upload - Uploads file data to a column</a></h3>\r
360 <pre><code>&gt; upload &lt;file&gt; &lt;SQL(UPDATE|INSERT)&gt;</code></pre>\r
361 <p>This command registers a data file to the column that specified by place-holder.</p>\r
362 <h3 id="wait---waits-for-specified-interval"><a href="#TOC">wait - Waits for specified interval</a></h3>\r
363 <pre><code>&gt; wait seconds</code></pre>\r
364 <p>This command waits for the interval that specified number (mixed decimal) of seconds. It may be useful for executing multiple commands.</p>\r
365 <h2 id="the-gui-mode"><a href="#TOC">The GUI Mode</a></h2>\r
366 <h3 id="common-behaviors"><a href="#TOC">Common Behaviors</a></h3>\r
367 <p>Standard commands, &quot;undo&quot;, &quot;redo&quot;, &quot;cut&quot;, &quot;copy&quot;, &quot;paste&quot;, and &quot;select all&quot;, can use in all text components via context menu or shortcut key.</p>\r
368 <h3 id="main-window"><a href="#TOC">Main Window</a></h3>\r
369 <p>A window has &quot;Input/Output Area&quot;, &quot;Result Set Table&quot;, &quot;Database Info Tree&quot;, &quot;Main Menu&quot;, &quot;Status Bar&quot; and &quot;Find Pane&quot;. By default, the database info tree, the status bar and the find pane&quot; are hidden.</p>\r
370 <h3 id="inputoutput-area-text-area"><a href="#TOC">Input/Output Area ( text area )</a></h3>\r
371 <p>The I/O area is similar to CUI interface.</p>\r
372 <p>... When cursor is at the end of textarea, executes command which is string from prompt to the end of textarea. ... Otherwise, move cursor to the end of textarea. ... The part before prompt can't edit.</p>\r
373 <p>... Context menus for this component has the standard commands.</p>\r
374 <h3 id="paste-paths-into-the-text-area-via-dnd-new-feature-in-version-4.2"><a href="#TOC">Paste Paths Into The Text Area Via DnD &lt;new feature in version 4.2&gt;</a></h3>\r
375 <p>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.</p>\r
376 <h3 id="result-set-table"><a href="#TOC">Result Set Table</a></h3>\r
377 <p>The result set table displays command results, usually query results from database.</p>\r
378 <p>The row header (the leftmost of the table) displays the row number. ... display &quot;+&quot; sign instead of the row number in the row header.</p>\r
379 <p>Automatic column width adjustment ...</p>\r
380 <p>The context menu for this component are listed below:</p>\r
381 <dl>\r
382 <dt>Sorts clicked column</dt>\r
383 <dd><p>This command sorts clicked column, not a selected one. The same column is sorted continuously, ... reverse.</p>\r
384 </dd>\r
385 <dt>Copy (Ctrl-C)</dt>\r
386 <dd><p>This command copies selected cell values as text into the clipboard.</p>\r
387 </dd>\r
388 <dt>Copy With Escape (Ctrl+Shift-C)</dt>\r
389 <dd><p>This command copies selected cell values as quoted strings into the clipboard.</p>\r
390 </dd>\r
391 <dt>Paste (Ctrl-V)</dt>\r
392 <dd><p>This command pastes values into selected cells from the clipboard. Type conversion from the text to column types of the cells depends on each JDBC driver implementation.</p>\r
393 </dd>\r
394 <dt>Select All (Ctrl-A)</dt>\r
395 <dd><p>This command selects all cells in the table.</p>\r
396 </dd>\r
397 <dt>Clear Selected Cell Value</dt>\r
398 <dd><p>This command clears selected cell values (actually sets NULL).</p>\r
399 </dd>\r
400 <dt>Set Current Time Value</dt>\r
401 <dd><p>This command sets current time (Timestamp) into selected cells.</p>\r
402 </dd>\r
403 <dt>Copy Column Names</dt>\r
404 <dd><p>This command copies the table header as text into the clipboard.</p>\r
405 </dd>\r
406 <dt>Find Column Name</dt>\r
407 <dd><p>This command shows the find pane and sets find target ...</p>\r
408 </dd>\r
409 <dt>Add New (Empty) Row</dt>\r
410 <dd><p>This command adds a new empty row into the table.</p>\r
411 </dd>\r
412 <dt>Insert From Clipboard</dt>\r
413 <dd><p>This command ... imports data from the clipboard and inserts the data into the linking table.</p>\r
414 </dd>\r
415 <dt>Duplicate Rows</dt>\r
416 <dd><p>This command adds duplicate rows ... selected cells.</p>\r
417 </dd>\r
418 <dt>Link Rows Into Database</dt>\r
419 <dd><p>This command make unlink ...</p>\r
420 </dd>\r
421 <dt>Delete Rows</dt>\r
422 <dd><p>This command deletes selected rows. The deleted rows are also deleted from database.</p>\r
423 </dd>\r
424 </dl>\r
425 <h3 id="database-info-tree"><a href="#TOC">Database Info Tree</a></h3>\r
426 <p>The database info tree is a tree view of hierarchical structure, which consists catalogs, schemas, tables, table type and columns as a tree. Not connected: blank ... just connected: connector as a root node and sub nodes ... Each node expands ...</p>\r
427 <p>An &quot;Auto-expansion&quot; 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 &quot;autoexpansion.tsv&quot; in the system directory (.stew) and write node name lists as TSV into this file.</p>\r
428 <p>The context menu for this component are listed below:</p>\r
429 <dl>\r
430 <dt>Copy</dt>\r
431 <dd><p>This command copies displayed strings of selected nodes as text into the clipboard.</p>\r
432 </dd>\r
433 <dt>Copy Simple Name</dt>\r
434 <dd><p>This command copies the simple name of selected nodes as text into the clipboard.</p>\r
435 </dd>\r
436 <dt>Copy Full Name</dt>\r
437 <dd><p>This command copies the full qualified name of selected nodes as text into the clipboard.</p>\r
438 </dd>\r
439 <dt>Refresh</dt>\r
440 <dd><p>This command ...</p>\r
441 </dd>\r
442 <dt>Generate WHERE Phrase</dt>\r
443 <dd><p>This command generates a WHERE phrase consisting selected tables and columns ... selected same name, generate ...</p>\r
444 </dd>\r
445 <dt>Generate SELECT Statement (with WHERE)</dt>\r
446 <dd><p>This command generates a SELECT statement with &quot;WHERE&quot; keyword.</p>\r
447 </dd>\r
448 <dt>Generate UPDATE Statement (with WHERE)</dt>\r
449 <dd><p>This command ...</p>\r
450 </dd>\r
451 <dt>Generate INSERT Statement</dt>\r
452 <dd><p>This command ...</p>\r
453 </dd>\r
454 <dt>Jump To Column By Name</dt>\r
455 <dd><p>This command ... the name of selected node. Jump to the column which has the same name in current result table if found it. Double-clicking the node is the same as this command.</p>\r
456 </dd>\r
457 <dt>Toggle Show Column Number</dt>\r
458 <dd><p>This command provides the toggle between showing and hiding the column number of all columns nodes.</p>\r
459 </dd>\r
460 </dl>\r
461 <h3 id="main-menu"><a href="#TOC">Main Menu</a></h3>\r
462 <p>See Menus ...</p>\r
463 <h3 id="status-bar"><a href="#TOC">Status Bar</a></h3>\r
464 <p>... Display last command and its execution time. ...This time is not query but command.</p>\r
465 <h3 id="saving-configuration"><a href="#TOC">Saving Configuration</a></h3>\r
466 <p>...</p>\r
467 <h3 id="key-binding"><a href="#TOC">Key Binding</a></h3>\r
468 <p>... It is not able to change key bind after opening new window. ... For the keywords, see https://github.com/argius/Stew4/blob/master/src/net/argius/stew/ui/window/Menu.u8p</p>\r
469 <h2 id="menus-in-the-gui-mode"><a href="#TOC">Menus in the GUI Mode</a></h2>\r
470 <h3 id="file---new-window-n-ctrl-n"><a href="#TOC">File - New Window (N) Ctrl-N</a></h3>\r
471 <p>This command opens a new window. Current connections are independent of each window.</p>\r
472 <h3 id="file---close-window-c-ctrl-w"><a href="#TOC">File - Close Window (C) Ctrl-W</a></h3>\r
473 <p>This command closes current window. If connected, show confirm dialog.</p>\r
474 <p>If current window is only a window, processes as Quit(Q).</p>\r
475 <h3 id="file---quit-q-ctrl-q"><a href="#TOC">File - Quit (Q) Ctrl-Q</a></h3>\r
476 <p>This command quits this application. When executed, shows confirm dialog. Click &quot;Yes&quot; to quit.</p>\r
477 <h3 id="edit---cut-t-ctrl-x"><a href="#TOC">Edit - Cut (T) Ctrl-X</a></h3>\r
478 <p>This command cuts the selection to the clipboard.</p>\r
479 <h3 id="edit---copy-c-ctrl-c"><a href="#TOC">Edit - Copy (C) Ctrl-C</a></h3>\r
480 <p>This command copies the selection to the clipboard.</p>\r
481 <h3 id="edit---paste-p-ctrl-v"><a href="#TOC">Edit - Paste (P) Ctrl-V</a></h3>\r
482 <p>This command pastes the selection to the clipboard.</p>\r
483 <h3 id="edit---select-all-a-ctrl-a"><a href="#TOC">Edit - Select All (A) Ctrl-A</a></h3>\r
484 <p>This command selects all text or all elements.</p>\r
485 <h3 id="edit---find-f-ctrl-f"><a href="#TOC">Edit - Find (F) Ctrl-F</a></h3>\r
486 <p>This command finds out a specific string from selected component.</p>\r
487 <p>...</p>\r
488 <h3 id="edit---toggle-focus-g-ctrl-g-improved-feature-in-version-4.2"><a href="#TOC">Edit - Toggle focus (G) Ctrl-G &lt;improved feature in version 4.2&gt;</a></h3>\r
489 <p>This command toggles focus between the database info tree, the the result set table and the input/output area in a current window.</p>\r
490 <h3 id="edit---clear-message-m"><a href="#TOC">Edit - Clear Message (M)</a></h3>\r
491 <p>This command clears input/output area in a current window.</p>\r
492 <h3 id="view---show-status-bar-s"><a href="#TOC">View - Show Status Bar (S)</a></h3>\r
493 <p>This command toggles the visibility of status bar in a current window.</p>\r
494 <h3 id="view---show-column-number-c"><a href="#TOC">View - Show Column Number (C)</a></h3>\r
495 <p>This command toggles the visibility of column number in the result set table of a current window.</p>\r
496 <h3 id="view---show-info-tree-i"><a href="#TOC">View - Show Info Tree (I)</a></h3>\r
497 <p>This command toggles the visibility of database info tree in a current window.</p>\r
498 <h3 id="view---always-on-top-t"><a href="#TOC">View - Always On Top (T)</a></h3>\r
499 <p>This command toggles the state that always stays on top of a current window.</p>\r
500 <h3 id="view---refresh-r-f5"><a href="#TOC">View - Refresh (R) F5</a></h3>\r
501 <p>This command ...</p>\r
502 <h3 id="view---widen-column-width-w-ctrl-.period"><a href="#TOC">View - Widen Column Width (W) Ctrl-.(period)</a></h3>\r
503 <p>This command widens all column widths in the result set table of a current window.</p>\r
504 <h3 id="view---narrow-column-width-n-ctrl-comma"><a href="#TOC">View - Narrow Column Width (N) Ctrl-,(comma)</a></h3>\r
505 <p>This command narrows all column widths in the result set table of a current window.</p>\r
506 <h3 id="view---adjust-column-width-a-ctrl-slash"><a href="#TOC">View - Adjust Column Width (A) Ctrl-/(slash)</a></h3>\r
507 <p>This command adjusts all column widths in the result set table of a current window. For about adjust mode, see the next item.</p>\r
508 <h3 id="view---auto-adjust-mode-m"><a href="#TOC">View - Auto Adjust Mode (M)</a></h3>\r
509 <p>This command selects auto-adjusting mode to use when shows result.</p>\r
510 <p>There are following modes:</p>\r
511 <ul>\r
512 <li>None(N): does nothing.</li>\r
513 <li>Header(H): adjusts column width based on each header string.</li>\r
514 <li>Value(V): adjusts based on the longest string in column values.</li>\r
515 <li>Header And Value(A): adjusts based on the longest string in column values and column header string.</li>\r
516 </ul>\r
517 <h3 id="command---execute-x-ctrl-m"><a href="#TOC">Command - Execute (X) Ctrl-M</a></h3>\r
518 <p>This command executes command. This is same as pressing enter key in the end of the I/O area. (... same behavior)</p>\r
519 <h3 id="command---break-b-ctrl-pausebreak"><a href="#TOC">Command - BREAK (B) Ctrl-Pause(Break)</a></h3>\r
520 <p>This command cancels executing command. The process on the server is not canceled.</p>\r
521 <h3 id="command---history-back-p-ctrl-up"><a href="#TOC">Command - History Back (P) Ctrl-Up</a></h3>\r
522 <p>This command rotates command histories backward.</p>\r
523 <h3 id="command---history-next-n-ctrl-down"><a href="#TOC">Command - History Next (N) Ctrl-Down</a></h3>\r
524 <p>This command rotates command histories forward.</p>\r
525 <h3 id="command---show-all-historiesa-new-feature-in-version-4.2"><a href="#TOC">Command - Show All Histories(A) &lt;new feature in version 4.2&gt;</a></h3>\r
526 <p>This command shows all command histories and paste a choosen commmand.</p>\r
527 <h3 id="command---rollback-r"><a href="#TOC">Command - Rollback (R)</a></h3>\r
528 <p>This command displays confirm dialog and click &quot;OK&quot; to rollback.</p>\r
529 <h3 id="command---commit-m"><a href="#TOC">Command - Commit (M)</a></h3>\r
530 <p>This command displays confirm dialog and click &quot;OK&quot; to commit.</p>\r
531 <h3 id="command---connect-c-ctrl-e"><a href="#TOC">Command - Connect (C) Ctrl-E</a></h3>\r
532 <p>This command shows the list of connectors. Select connector name you want to connect to, and click &quot;OK&quot; to executes connect command.</p>\r
533 <h3 id="command---disconnect-d-ctrl-d"><a href="#TOC">Command - Disconnect (D) Ctrl-D</a></h3>\r
534 <p>This command disconnects current connection. This is the same as disconnect command.</p>\r
535 <h3 id="command---post-proccess-0"><a href="#TOC">Command - Post-Proccess (0)</a></h3>\r
536 <p>This command specifies the configuration of a &quot;Post-Proccess&quot; mode.</p>\r
537 <p>The &quot;Post-Proccess&quot; is an action to notify that command finished. When the window which command is running, is not active, &quot;Post-Proccess&quot; is invoked.</p>\r
538 <p>There are following modes:</p>\r
539 <ul>\r
540 <li>None(N): Does nothing.</li>\r
541 <li>Focus(F): Focuses window.</li>\r
542 <li>Shake(S): Shakes window.</li>\r
543 <li>Blink(B): Blinks window.</li>\r
544 </ul>\r
545 <h3 id="command---encryption-key-k"><a href="#TOC">Command - Encryption Key (K)</a></h3>\r
546 <p>This command shows the dialog to input an encryption key.</p>\r
547 <h3 id="command---edit-connectors-e"><a href="#TOC">Command - Edit Connectors (E)</a></h3>\r
548 <p>This command shows the dialog to edit connectors.</p>\r
549 <h3 id="data---sort-s-alt-s"><a href="#TOC">Data - Sort (S) Alt-S</a></h3>\r
550 <p>This command sorts records by selected column.</p>\r
551 <h3 id="data---import-file-i"><a href="#TOC">Data - Import File (I)</a></h3>\r
552 <p>This command imports from file into the table of current result.</p>\r
553 <h3 id="data---export-file-e-ctrl-shift-s"><a href="#TOC">Data - Export File (E) Ctrl-Shift-S</a></h3>\r
554 <p>This command exports results into file.</p>\r
555 <h3 id="help---show-help"><a href="#TOC">Help - Show Help</a></h3>\r
556 <p>This command shows this help file by default browser.</p>\r
557 <h3 id="help---about-stew"><a href="#TOC">Help - About Stew</a></h3>\r
558 <p>This command shows version dialog about Stew.</p>\r
559 <h2 id="properties"><a href="#TOC">Properties</a></h2>\r
560 <p>You can set these system properties into java -D option or stew.properties file.</p>\r
561 <h3 id="net.argius.stew.properties---location-of-properties-file"><a href="#TOC">net.argius.stew.properties - Location Of Properties File</a></h3>\r
562 <p>Property Value: a file path or a directory path</p>\r
563 <p>This property specifies the location of &quot;stew.properties&quot; file. This properties file is used as system properties and searched in the following steps:</p>\r
564 <p>+If it specifies a file path, the file will be used as system properties. +If it specifies a directory path, the file will be searched a &quot;stew.properties&quot; file in the directory. +Search a file in the classpath. +Search a file in the system directory.</p>\r
565 <p>The first file found is used. If a file is not found, ... (ignore it).</p>\r
566 <h3 id="net.argius.stew.directory---working-directory"><a href="#TOC">net.argius.stew.directory - Working Directory</a></h3>\r
567 <p>Property Value: a directory path (default: current directory)</p>\r
568 <p>This property specifies the current directory as a internal state at the start, but it is not a platform one.</p>\r
569 <h3 id="net.argius.stew.query.timeout---query-timeout"><a href="#TOC">net.argius.stew.query.timeout - Query Timeout</a></h3>\r
570 <p>Property Value: integer seconds (default: 0)</p>\r
571 <p>This property specifies the query timeout which is used in commands.</p>\r
572 <p>If it is under 0, the property was not set.</p>\r
573 <p>(implementation detail: for java.sql.Statement#setQueryTimeout)</p>\r
574 <h3 id="net.argius.stew.rowcount.limit---limit-of-display-result-row-count"><a href="#TOC">net.argius.stew.rowcount.limit - Limit Of Display Result Row Count</a></h3>\r
575 <p>Property Value: maximum number of rows (default: Integer.MAX_VALUE, about 2,147,000,000)</p>\r
576 <p>This property specifies the maximum number of rows which show in the result set table. It is not used to output files, such as the export command.</p>\r
577 <h3 id="net.argius.stew.command.import.batch.limit---limit-of-import-command-using-batch"><a href="#TOC">net.argius.stew.command.Import.batch.limit - Limit Of Import Command Using Batch</a></h3>\r
578 <p>Property Value: limit number of rows (default: 10000)</p>\r
579 <p>This property is used by the Import command. It is not used to output files, such as the export command.</p>\r
580 <h3 id="net.argius.stew.ui.window.resident---regident"><a href="#TOC">net.argius.stew.ui.window.resident - Regident</a></h3>\r
581 <p>Property Value: integer minutes</p>\r
582 <p>This is an experimental feature.</p>\r
583 <p>The app redraws continuously at the specified interval to prevent swap-out.</p>\r
584 <h3 id="logger-configurations"><a href="#TOC">Logger Configurations</a></h3>\r
585 <p>Use logging.properties in this package.</p>\r
586 </body>\r
587 </html>\r