Top Description Constructors Methods
org.apache.derby.impl.sql.compile

public Class OptTraceViewer

extends Object
implements OptionalTool
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.dictionary.OptionalTool
Imports
java.sql.Connection, .DriverManager, .PreparedStatement, .SQLException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.shared.common.i18n.MessageService, org.apache.derby.iapi.sql.dictionary.OptionalTool

OptionalTool for viewing the output created when you xml-trace the optimizer.

Constructor Summary

AccessConstructor and Description
public
OptTraceViewer()

0-arg constructor required by the OptionalTool contract

Method Summary

Modifier and TypeMethod and Description
private void
private Connection
public void
loadTool(String... configurationParameters)

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.loadTool.

Takes the following arguments:

  • fileURL - The url of the file holding the xml trace. E.g.: "file:///Users/me/mainline/z.txt"
private PreparedStatement
public void
unloadTool(String... configurationParameters)

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.unloadTool.

Drop the schema objects which were created for viewing the xml file containing the optimizer trace.

private SQLException
wrap(Throwable t)

Wrap an exception in a SQLException

private SQLException
wrap(String errorMessage)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

OptTraceViewerback to summary
public OptTraceViewer()

0-arg constructor required by the OptionalTool contract

Method Detail

executeDDLback to summary
private void executeDDL(Connection conn, String text) throws SQLException
getDerbyConnectionback to summary
private Connection getDerbyConnection() throws SQLException
loadToolback to summary
public void loadTool(String... configurationParameters) throws SQLException

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.loadTool.

Takes the following arguments:

  • fileURL - The url of the file holding the xml trace. E.g.: "file:///Users/me/mainline/z.txt"

...and creates the following schema objects for viewing the xml trace of the optimizer:

  • ArrayList - A user-defined type wrapping java.util.ArrayList.
  • asList - A factory function for creating ArrayLists.
  • planCost - An XmlVTI for viewing xml traces.
  • planCost - A view which passes the file name to the XmlVTI.
prepareStatementback to summary
private PreparedStatement prepareStatement(Connection conn, String text) throws SQLException
unloadToolback to summary
public void unloadTool(String... configurationParameters) throws SQLException

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.unloadTool.

Drop the schema objects which were created for viewing the xml file containing the optimizer trace.

wrapback to summary
private SQLException wrap(Throwable t)

Wrap an exception in a SQLException

wrapback to summary
private SQLException wrap(String errorMessage)