|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hsqldb.cmdline.SqlTool
public class SqlTool
A command-line JDBC SQL tool supporting both interactive and non-interactive usage.
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
Nested Class Summary | |
---|---|
static class |
SqlTool.SqlToolException
|
Field Summary | |
---|---|
static int |
CONNECTERR_EXITVAL
|
static String |
DEFAULT_RCFILE
|
static int |
FILEERR_EXITVAL
|
static int |
INPUTERR_EXITVAL
|
static int |
IOERR_EXITVAL
|
static String |
LS
Platform-specific line separator |
static int |
RCERR_EXITVAL
|
static int |
SQLERR_EXITVAL
|
static int |
SQLTOOLERR_EXITVAL
|
static int |
SYNTAXERR_EXITVAL
|
Constructor Summary | |
---|---|
SqlTool()
|
Method Summary | |
---|---|
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). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 String LS
Constructor Detail |
---|
public SqlTool()
Method Detail |
---|
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.
objectMain(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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |