|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.util.Tool
org.h2.tools.Shell
public class Shell
Interactive command line tool to access a database using JDBC.
| Field Summary |
|---|
| Fields inherited from class org.h2.util.Tool |
|---|
out |
| Constructor Summary | |
|---|---|
Shell()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String... args)
Options are case sensitive. |
protected void |
print(java.lang.String s)
Print the string without newline, and flush. |
void |
run()
INTERNAL. |
void |
runTool(java.lang.String... args)
Run the shell tool with the given command line settings. |
void |
setErr(java.io.PrintStream err)
Sets the standard error stream. |
void |
setIn(java.io.InputStream in)
Redirects the standard input. |
void |
setInReader(java.io.BufferedReader reader)
Redirects the standard input. |
| Methods inherited from class org.h2.util.Tool |
|---|
isOption, printNoDatabaseFilesFound, setOut, showUsage, showUsageAndThrowUnsupportedOption, throwUnsupportedOption |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Shell()
| Method Detail |
|---|
public static void main(java.lang.String... args)
throws java.sql.SQLException
| [-help] or [-?] | Print the list of options |
| [-url "<url>"] | The database URL (jdbc:h2:...) |
| [-user <user>] | The user name |
| [-password <pwd>] | The password |
| [-driver <class>] | The JDBC driver class to use (not required in most cases) |
| [-sql "<statements>"] | Execute the SQL statements and exit |
| [-properties "<dir>"] | Load the server properties from this directory |
args - the command line arguments
java.sql.SQLExceptionpublic void setErr(java.io.PrintStream err)
err - the new standard error streampublic void setIn(java.io.InputStream in)
in - the input stream to usepublic void setInReader(java.io.BufferedReader reader)
reader - the input stream reader to use
public void runTool(java.lang.String... args)
throws java.sql.SQLException
runTool in class Toolargs - the command line settings
java.sql.SQLExceptionprotected void print(java.lang.String s)
s - the string to printpublic void run()
run in interface java.lang.Runnable
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||