public class SqlTool extends Object
See JavaDocs for the main method for syntax of how to run from the command-line.
 Programmatic users will usually want to use the objectMain(String[]) method
 if they want arguments and behavior exactly like command-line SqlTool.
 But in many cases, you will have better control and efficiency by using
 the SqlFile class directly.  The file
 src/org/hsqldb/sample/SqlFileEmbedder.java
 in the HSQLDB distribution provides an example for this latter strategy.
main(String[]), 
objectMain(String[]), 
SqlFile, 
SqlFileEmbedder| Modifier and Type | Class and Description | 
|---|---|
| static class  | SqlTool.SqlToolException | 
| Modifier and Type | Field and Description | 
|---|---|
| static int | CONNECTERR_EXITVAL | 
| static String | DEFAULT_RCFILE | 
| static int | FILEERR_EXITVAL | 
| static int | INPUTERR_EXITVAL | 
| static int | IOERR_EXITVAL | 
| static String | LSPlatform-specific line separator | 
| static int | RCERR_EXITVAL | 
| static int | SQLERR_EXITVAL | 
| static int | SQLTOOLERR_EXITVAL | 
| static int | SYNTAXERR_EXITVAL | 
| Constructor and Description | 
|---|
| SqlTool() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | main(String[] args)A static wrapper for objectMain, so that that method may be executed
 as a Java "program". | 
| static void | objectMain(String[] arg)Connect to a JDBC Database and execute the commands given on
 stdin or in SQL file(s). | 
public static final String DEFAULT_RCFILE
public static final int SQLTOOLERR_EXITVAL
public static final int SYNTAXERR_EXITVAL
public static final int RCERR_EXITVAL
public static final int SQLERR_EXITVAL
public static final int IOERR_EXITVAL
public static final int FILEERR_EXITVAL
public static final int INPUTERR_EXITVAL
public static final int CONNECTERR_EXITVAL
public static final String LS
public static void main(String[] args)
Throws only RuntimeExceptions or Errors, because this method is intended to System.exit() for all but disastrous system problems, for which the inconvenience of a stack trace would be the least of your worries.
If you don't want SqlTool to System.exit(), then use the method objectMain() instead of this method.
args - argumentsobjectMain(String[])public static void objectMain(String[] arg) throws SqlTool.SqlToolException
This method is changed for HSQLDB 1.8.0.8 and later to never System.exit(). Developers may catch Throwables to handle all fatal situations.
arg - Run "java... org.hsqldb.cmdline.SqlTool --help" for syntax.SqlTool.SqlToolException - Upon any fatal error, with useful
                          reason as the exception's message.Copyright © 2001 - 2017 HSQL Development Group.