% Stew4 User Manual % % 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 - 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 - Configuration Of "Connector"](#configuration-of-connector). ### Other For more information, see the project site. - - ## Installation Just extract the package archive file. ## Running App If you want to use GUI mode, execute the following command: > java -jar stew.jar --gui If you want to use CUI mode, execute the following command: > java -jar stew.jar --cui At first time, a system directory ".stew" created. It is used by some configurations. By default, ".stew" creates at the current directory. ## Uninstallation Remove all of installed files and ".stew" directory. ---------------------------------------------------------------------------------------------------- ## Usage To access database with Stew, you need DBMS that supports JDBC and its JDBC driver. For details, see the manual of DBMS. ### Configuration Of "Connector" In Stew, an asset of JDBC Connection called it "Connector". In CUI mode, to start edit tool, specifies --edit option. # command line $ stew --edit # running stew > --edit In GUI mode, executes "Edit Connectors" to start edit dialog. Connector has the following properties: Connector ID : ID for connector command. Allows only ASCII letters (A-Za-z0-9). Connector Name : The name to display at Prompt. Classpath : Specifies classpath of JDBC driver. This form is same with -CLASSPATH option. Driver : Specifies the driver class that implements java.sql.Driver. (In GUI mode, you can use the "search Driver" button.) URL to connect : Specifies JDBC URL (same as url at DriverManager.getConnection(url)). User : Specifies the user ID. Password : Specifies the password of its user ID. Encryption : Specifies the type to save password into file. See the next section. Readonly : Is set to READONLY the connection, so that you can not run the commands that update. (., Which according to ReadOnly the command side) Auto Rollback : If it was set, the transaction will be rollbacked automatically when disconnect. ### About Password Management How to save the password, you can select the encryption process. PlainTextPassword : Saves as plain text. (default) PbePassword : You can store your password by using the PBE encryption. ### Anonymous Connector ### Interactive Mode ### Non-interactive Mode ### Alias ## Commands ### connect - Connects to database (built-in) > connect > -c This command connects to database with prepared Connector. In interactive mode, connection is kept until disconnect. If already connected, disconnect it first, then connect. ### disconnect - Disconnects from database (built-in) > disconnect > -d This command disconnects from database. If auto-rollback was available, try to rollback before disconnecting. ### commit - Commits current transaction (built-in) This command commits current transaction. ** caution: Commit cannot cancel. Please use carefully. ** ### rollback - Rollbacks current transaction (built-in) This command rollbacks a current transaction. ### -e - Evaluates multiple commands (built-in) > -e -e ... For example, you can execute two export command continuously, or can execute as batch in non-interactive mode. ### -f - Executes file content as command (built-in) > -f ... ### -s - Executes file content as script (built-in) \ > -s . |