All of the methods are static. The output stream to write to is always passed in, along with the JDBC objects to display.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static int | |
| private static final int | |
| private static boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | checkNotNull(Object
the object to test o, String the information to include in the error if it is null what)Check if an object is null, and if it is, throw an exception with an informative parameter about what was null. |
| public static int | DisplayBanner(PrintWriter
the place to write to out, ResultSetMetaData the ResultSetMetaData to use rsmd)Print a banner containing the column labels separated with '|'s and a line of '-'s. |
| public static int | |
| public static void | DisplayCurrentRow(PrintWriter
the place to write to out, ResultSet the ResultSet in use rs, Connection the Connection against which the ResultSet was retrieved conn)Display the current row of the result set along with a banner. |
| public static void | |
| public static void | DisplayMultipleResults(PrintWriter
the place to write to out, List<ResultSet> list of resultSets, Connection ResultSets to displaythe connection against which the conn, int[] ResultSets
were retrievedcolumn numbers to display, displayColumns, int[] null if allcolumn widths, in characters, if
displayColumnWidths)displayColumns is specified
|
| private static void | DisplayNestedResults(PrintWriter
the place to write to out, Vector<ResultSet> the vector of results nr, Connection the Connection against which the ResultSet was retrieved conn, int number of tab stops to indent line indentLevel)
|
| private static void | |
| public static void | DisplayNextRow(PrintWriter
the place to write to out, ResultSet the ResultSet in use rs, Connection the Connection against which the ResultSet was retrieved conn)Fetch the next row of the result set, and if it exists format and display a banner and the row. |
| public static void | |
| public static void | DisplayResults(PrintWriter
the place to write to out, Statement the Statement to display stmt, Connection the Connection against which the statement was executed conn)Pretty-print the results of a statement that has been executed. |
| public static void | DisplayResults(PrintWriter
the place to write to out, ResultSet the rs, Connection ResultSet to displaythe connection against which the conn, int[] ResultSet
was retrievedcolumn numbers to display, displayColumns, int[] null if allcolumn widths, in characters, if
displayColumnWidths)displayColumns is specified
|
| public static void | |
| public static void | |
| private static void | DisplayRow(PrintWriter
the place to write to out, ResultSet the ResultSet to use rs, ResultSetMetaData the ResultSetMetaData to use rsmd, int rowLen, Vector<ResultSet> nestedResults, Connection conn, int number of tab stops to indent line indentLevel, int[] A list of column numbers to display displayColumns, int[] If displayColumns is set, the width of
columns to display, in characters. displayColumnWidths)Print one row of a result set, padding each field to the display width and separating them with '|'s |
| private static void | DisplayRow(PrintStream out, ResultSet rs, ResultSetMetaData rsmd, int rowLen, Vector<ResultSet> nestedResults, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| pack-priv static void | DisplayUpdateCount(PrintWriter
the place to write to out, int the update count to display count, int number of tab stops to indent line indentLevel)
|
| pack-priv static void | |
| public static void | doTrace(PrintWriter
the output stream to write to out, Exception the exception to display e)If the property ij.exceptionTrace is true, display the stack trace to the print stream. |
| public static void | |
| private static int[] | getColumnDisplayWidths(ResultSetMetaData rsmd, int[] dispColumns, boolean localizedOutput)
Calculates column display widths from the default widths of the result set. |
| public static boolean | |
| private static boolean | |
| private static void | |
| private static void | |
| private static int | indent_DisplayBanner(PrintWriter out, ResultSetMetaData rsmd, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static int | indent_DisplayBanner(PrintStream out, ResultSetMetaData rsmd, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayCurrentRow(PrintWriter out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayCurrentRow(PrintStream out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayNextRow(PrintWriter out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayNextRow(PrintStream out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayResults(PrintWriter out, Statement stmt, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayResults(PrintWriter out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayResults(PrintWriter out, List<ResultSet> resultSets, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayResults(PrintStream out, Statement stmt, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | indent_DisplayResults(PrintStream out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths)
|
| private static void | |
| private static void | |
| private static void | |
| private static void | |
| public static String | |
| public static void | |
| public static void | |
| public static void | ShowException(PrintWriter
the place to write to out, Throwable the exception to display e)Print information about the exception to the given PrintWriter. |
| public static void | |
| public static void | ShowSQLException(PrintWriter
the place to write to out, SQLException the exception to display e)Print information about the SQL exception to the given PrintWriter. |
| public static void | |
| public static void | ShowWarnings(PrintWriter
the place to write to out, Connection the connection that may have warnings. theConnection)Print information about the SQL warnings for the connection to the given PrintWriter. |
| public static void | |
| public static void | ShowWarnings(PrintWriter
the place to write to out, ResultSet the ResultSet that may have warnings on it rs)Print information about the SQL warnings for the ResultSet to the given PrintWriter. |
| public static void | ShowWarnings(PrintWriter
the place to write to out, Statement the Statement that may have warnings on it s)Print information about the SQL warnings for the Statement to the given PrintWriter. |
| public static void | |
| public static void | |
| public static void | |
| public static void |
| MAX_RETRIES | back to summary |
|---|---|
| private static final int MAX_RETRIES | |
| maxWidth | back to summary |
|---|---|
| private static int maxWidth | |
| MINWIDTH | back to summary |
|---|---|
| private static final int MINWIDTH | |
| showSelectCount | back to summary |
|---|---|
| private static boolean showSelectCount | |
| JDBCDisplayUtil | back to summary |
|---|---|
| public JDBCDisplayUtil() | |
| checkNotNull | back to summary |
|---|---|
| public static void checkNotNull(Object o, String what) Check if an object is null, and if it is, throw an exception with an informative parameter about what was null. The exception is a run-time exception that is internal to ij. | |
| DisplayBanner | back to summary |
|---|---|
| public static int DisplayBanner(PrintWriter out, ResultSetMetaData rsmd) throws SQLException Print a banner containing the column labels separated with '|'s and a line of '-'s. Each field is as wide as the display width reported by the metadata.
| |
| DisplayBanner | back to summary |
|---|---|
| public static int DisplayBanner(PrintStream out, ResultSetMetaData rsmd) throws SQLException | |
| DisplayCurrentRow | back to summary |
|---|---|
| public static void DisplayCurrentRow(PrintWriter out, ResultSet rs, Connection conn) throws SQLException Display the current row of the result set along with a banner. Assume the result set is on a row.
| |
| DisplayCurrentRow | back to summary |
|---|---|
| public static void DisplayCurrentRow(PrintStream out, ResultSet rs, Connection conn) throws SQLException | |
| DisplayMultipleResults | back to summary |
|---|---|
public static void DisplayMultipleResults(PrintWriter out, List<ResultSet> resultSets, Connection conn, int[] displayColumns, int[] displayColumnWidths) throws SQLException
| |
| DisplayNestedResults | back to summary |
|---|---|
private static void DisplayNestedResults(PrintWriter out, Vector<ResultSet> nr, Connection conn, int indentLevel) throws SQLException
| |
| DisplayNestedResults | back to summary |
|---|---|
| private static void DisplayNestedResults(PrintStream out, Vector<ResultSet> nr, Connection conn, int indentLevel) throws SQLException | |
| DisplayNextRow | back to summary |
|---|---|
| public static void DisplayNextRow(PrintWriter out, ResultSet rs, Connection conn) throws SQLException Fetch the next row of the result set, and if it exists format and display a banner and the row.
| |
| DisplayNextRow | back to summary |
|---|---|
| public static void DisplayNextRow(PrintStream out, ResultSet rs, Connection conn) throws SQLException | |
| DisplayResults | back to summary |
|---|---|
| public static void DisplayResults(PrintWriter out, Statement stmt, Connection conn) throws SQLException Pretty-print the results of a statement that has been executed. If it is a select, gathers and prints the results. Display partial results up to the first error. If it is not a SELECT, determine if rows were involved or not, and print the appropriate message.
| |
| DisplayResults | back to summary |
|---|---|
public static void DisplayResults(PrintWriter out, ResultSet rs, Connection conn, int[] displayColumns, int[] displayColumnWidths) throws SQLException
| |
| DisplayResults | back to summary |
|---|---|
| public static void DisplayResults(PrintStream out, Statement stmt, Connection conn) throws SQLException | |
| DisplayResults | back to summary |
|---|---|
| public static void DisplayResults(PrintStream out, ResultSet rs, Connection conn) throws SQLException | |
| DisplayRow | back to summary |
|---|---|
| private static void DisplayRow(PrintWriter out, ResultSet rs, ResultSetMetaData rsmd, int rowLen, Vector<ResultSet> nestedResults, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException Print one row of a result set, padding each field to the display width and separating them with '|'s
| |
| DisplayRow | back to summary |
|---|---|
| private static void DisplayRow(PrintStream out, ResultSet rs, ResultSetMetaData rsmd, int rowLen, Vector<ResultSet> nestedResults, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| DisplayUpdateCount | back to summary |
|---|---|
pack-priv static void DisplayUpdateCount(PrintWriter out, int count, int indentLevel)
| |
| DisplayUpdateCount | back to summary |
|---|---|
| pack-priv static void DisplayUpdateCount(PrintStream out, int count, int indentLevel) | |
| doTrace | back to summary |
|---|---|
| public static void doTrace(PrintWriter out, Exception e) If the property ij.exceptionTrace is true, display the stack trace to the print stream. Otherwise, do nothing.
| |
| doTrace | back to summary |
|---|---|
| public static void doTrace(PrintStream out, Exception e) | |
| getColumnDisplayWidths | back to summary |
|---|---|
| private static int[] getColumnDisplayWidths(ResultSetMetaData rsmd, int[] dispColumns, boolean localizedOutput) throws SQLException Calculates column display widths from the default widths of the result set. | |
| getShowSelectCount | back to summary |
|---|---|
| public static boolean getShowSelectCount() | |
| getSystemBoolean | back to summary |
|---|---|
| private static boolean getSystemBoolean(final String name) Get an ij boolean system property.
| |
| indent | back to summary |
|---|---|
| private static void indent(PrintWriter out, int indentLevel) | |
| indent | back to summary |
|---|---|
| private static void indent(PrintStream out, int indentLevel) | |
| indent_DisplayBanner | back to summary |
|---|---|
| private static int indent_DisplayBanner(PrintWriter out, ResultSetMetaData rsmd, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayBanner | back to summary |
|---|---|
| private static int indent_DisplayBanner(PrintStream out, ResultSetMetaData rsmd, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayCurrentRow | back to summary |
|---|---|
| private static void indent_DisplayCurrentRow(PrintWriter out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayCurrentRow | back to summary |
|---|---|
| private static void indent_DisplayCurrentRow(PrintStream out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayNextRow | back to summary |
|---|---|
| private static void indent_DisplayNextRow(PrintWriter out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayNextRow | back to summary |
|---|---|
| private static void indent_DisplayNextRow(PrintStream out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayResults | back to summary |
|---|---|
| private static void indent_DisplayResults(PrintWriter out, Statement stmt, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayResults | back to summary |
|---|---|
| private static void indent_DisplayResults(PrintWriter out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayResults | back to summary |
|---|---|
| private static void indent_DisplayResults(PrintWriter out, List<ResultSet> resultSets, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayResults | back to summary |
|---|---|
| private static void indent_DisplayResults(PrintStream out, Statement stmt, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indent_DisplayResults | back to summary |
|---|---|
| private static void indent_DisplayResults(PrintStream out, ResultSet rs, Connection conn, int indentLevel, int[] displayColumns, int[] displayColumnWidths) throws SQLException | |
| indentedPrintLine | back to summary |
|---|---|
| private static void indentedPrintLine(PrintWriter out, int indentLevel, String text) | |
| indentedPrintLine | back to summary |
|---|---|
| private static void indentedPrintLine(PrintWriter out, int indentLevel, StringBuffer text) | |
| indentedPrintLine | back to summary |
|---|---|
| private static void indentedPrintLine(PrintStream out, int indentLevel, String text) | |
| indentedPrintLine | back to summary |
|---|---|
| private static void indentedPrintLine(PrintStream out, int indentLevel, StringBuffer text) | |
| mapNull | back to summary |
|---|---|
| public static String mapNull(String s, String nullValue) Map the string to the value if it is null. | |
| setMaxDisplayWidth | back to summary |
|---|---|
| public static void setMaxDisplayWidth(int maxDisplayWidth) | |
| setShowSelectCount | back to summary |
|---|---|
| public static void setShowSelectCount(boolean newValue) | |
| ShowException | back to summary |
|---|---|
| public static void ShowException(PrintWriter out, Throwable e) Print information about the exception to the given PrintWriter. For non-SQLExceptions, does a stack trace. For SQLExceptions, print a standard error message and walk the list, if any.
| |
| ShowException | back to summary |
|---|---|
| public static void ShowException(PrintStream out, Throwable e) | |
| ShowSQLException | back to summary |
|---|---|
| public static void ShowSQLException(PrintWriter out, SQLException e) Print information about the SQL exception to the given PrintWriter. Walk the list of exceptions, if any.
| |
| ShowSQLException | back to summary |
|---|---|
| public static void ShowSQLException(PrintStream out, SQLException e) | |
| ShowWarnings | back to summary |
|---|---|
| public static void ShowWarnings(PrintWriter out, Connection theConnection) Print information about the SQL warnings for the connection to the given PrintWriter. Walks the list of exceptions, if any.
| |
| ShowWarnings | back to summary |
|---|---|
public static void ShowWarnings(PrintWriter out, SQLWarning warning)
| |
| ShowWarnings | back to summary |
|---|---|
| public static void ShowWarnings(PrintWriter out, ResultSet rs) Print information about the SQL warnings for the ResultSet to the given PrintWriter. Walk the list of exceptions, if any.
| |
| ShowWarnings | back to summary |
|---|---|
| public static void ShowWarnings(PrintWriter out, Statement s) Print information about the SQL warnings for the Statement to the given PrintWriter. Walks the list of exceptions, if any.
| |
| ShowWarnings | back to summary |
|---|---|
| public static void ShowWarnings(PrintStream out, Connection theConnection) | |
| ShowWarnings | back to summary |
|---|---|
| public static void ShowWarnings(PrintStream out, SQLWarning warning) | |
| ShowWarnings | back to summary |
|---|---|
| public static void ShowWarnings(PrintStream out, ResultSet rs) | |
| ShowWarnings | back to summary |
|---|---|
| public static void ShowWarnings(PrintStream out, Statement s) | |