|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xigole.util.sql.outputformatter.CSVFormatter
public class CSVFormatter
This is the default formatter for Jisql. It outputs data in a "normal" format that is similar to most other database command line formatters.
| Constructor Summary | |
|---|---|
CSVFormatter()
|
|
| Method Summary | |
|---|---|
void |
consumeOptions(joptsimple.OptionSet options)
Consumes any options that were specified on the command line. |
void |
formatData(java.io.PrintStream out,
java.sql.ResultSet resultSet,
java.sql.ResultSetMetaData metaData)
Called to output the data. |
void |
formatFooter(java.io.PrintStream out,
java.sql.ResultSetMetaData metaData)
Outputs a footer for a query. |
void |
formatHeader(java.io.PrintStream out,
java.sql.ResultSetMetaData metaData)
Outputs an optional header for the CSV data. |
void |
setSupportedOptions(joptsimple.OptionParser parser)
Sets a the supported option list for this formatter. |
void |
usage(java.io.PrintStream out)
Called to output a usage message to the command line window. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVFormatter()
| Method Detail |
|---|
public void setSupportedOptions(joptsimple.OptionParser parser)
setSupportedOptions in interface JisqlFormatterparser - the OptionParser to use.
public void consumeOptions(joptsimple.OptionSet options)
throws java.lang.Exception
consumeOptions in interface JisqlFormatteroptions - the OptionSet that the main driver is using.
java.lang.Exception - if there is a problem parsing the command line arguments.public void usage(java.io.PrintStream out)
usage in interface JisqlFormatterout - the PrintStream to display the usage message on.
public void formatHeader(java.io.PrintStream out,
java.sql.ResultSetMetaData metaData)
throws java.lang.Exception
formatHeader in interface JisqlFormatterout - a PrintStream to send any output to.metaData - the ResultSetMetaData for the output.
java.lang.Exception
public void formatData(java.io.PrintStream out,
java.sql.ResultSet resultSet,
java.sql.ResultSetMetaData metaData)
throws java.lang.Exception
formatData in interface JisqlFormatterout - the PrintStream to output data to.resultSet - the ResultSet for the row.metaData - the ResultSetMetaData for the row.
java.lang.Exception
public void formatFooter(java.io.PrintStream out,
java.sql.ResultSetMetaData metaData)
throws java.lang.Exception
formatFooter in interface JisqlFormatterout - the PrintStream to output data to.metaData - the ResultSetMetaData for the output.
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||