Package org.apache.derby.impl.tools.ij
Class Main
java.lang.Object
org.apache.derby.impl.tools.ij.Main
This is the controller for ij. It uses two parsers:
one to grab the next statement, and another to
see if it is an ij command, and if so execute it.
If it is not an ij command, it is treated as a JSQL
statement and executed against the current connection.
ijParser controls the current connection, and so contains
all of the state information for executing JSQL statements.
This was written to facilitate a test harness for language functionality tests.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMain()
create an ij tool waiting to be given input and output streams.Main
(boolean trash) This constructor is only used so that we can get to the right Main based on the JDBC version.Main
(LocalizedOutput out) -
Method Summary
Modifier and TypeMethodDescriptiongetMain
(LocalizedOutput out) Get the right Main (according to the JDBC version.getutilMain
(int numConnections, LocalizedOutput out) Get the right utilMain (according to the JDBC version.getutilMain
(int numConnections, LocalizedOutput out, boolean loadSystemProperties) Get the right utilMain (according to the JDBC version.private void
go
(LocalizedInput in, LocalizedOutput out) Give a shortcut to go on the utilInstance so we don't expose utilMain.private void
static void
ij can be used directly on a shell command line through its main program.static void
-
Field Details
-
utilInstance
-
-
Constructor Details
-
Main
public Main()create an ij tool waiting to be given input and output streams. -
Main
-
Main
public Main(boolean trash) This constructor is only used so that we can get to the right Main based on the JDBC version. We don't do any work in this constructor and we only use this object to get to the right Main via getMain().
-
-
Method Details
-
main
ij can be used directly on a shell command line through its main program.- Parameters:
args
- allows 1 file name to be specified, from which input will be read; if not specified, stdin is used.- Throws:
IOException
-
mainCore
- Throws:
IOException
-
getMain
Get the right Main (according to the JDBC version.- Returns:
- The right main (according to the JDBC version).
-
getutilMain
Get the right utilMain (according to the JDBC version.- Returns:
- The right utilMain (according to the JDBC version).
-
getutilMain
Get the right utilMain (according to the JDBC version. This overload allows the choice of whether the system properties will be used or not.- Returns:
- The right utilMain (according to the JDBC version).
-
go
Give a shortcut to go on the utilInstance so we don't expose utilMain. -
initAppUI
private void initAppUI()
-