org.objectweb.cjdbc.console.text.formatter
Class ResultSetFormatter
java.lang.Object
org.objectweb.cjdbc.console.text.formatter.ResultSetFormatter
- public class ResultSetFormatter
- extends java.lang.Object
Utility class to format a ResultSet
to display it prettily in the text console
- Author:
- Jeff Mesnil
Method Summary |
private static void |
appendPad(java.lang.String text,
int size,
Console console)
|
private static void |
appendSeparatorLine(int columnCount,
java.sql.ResultSetMetaData meta,
Console console)
|
static void |
formatAndDisplay(java.sql.ResultSet rs,
int fetchsize,
Console console)
Format and display the given ResultSet on the console. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_COLUMN_DISPLAY_WIDTH
private static final int MAX_COLUMN_DISPLAY_WIDTH
- Max column width when displaying a
ResultSet
.
- See Also:
- Constant Field Values
ResultSetFormatter
public ResultSetFormatter()
formatAndDisplay
public static void formatAndDisplay(java.sql.ResultSet rs,
int fetchsize,
Console console)
throws java.sql.SQLException
- Format and display the given
ResultSet
on the console.
- Parameters:
rs
- the ResultSet
to displayfetchsize
- fetchisze valueconsole
- console where the ResultSet will be displayed
and he size of the result set)
- Throws:
java.sql.SQLException
- if an error occurs
appendSeparatorLine
private static void appendSeparatorLine(int columnCount,
java.sql.ResultSetMetaData meta,
Console console)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
appendPad
private static void appendPad(java.lang.String text,
int size,
Console console)
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.