Interface JdbcResultSetCsvWriter

All Superinterfaces:
AutoCloseable, Closeable, Flushable, org.supercsv.io.ICsvWriter
All Known Implementing Classes:
ResultSetCsvWriter

public interface JdbcResultSetCsvWriter extends org.supercsv.io.ICsvWriter
Write JDBC ResultSet instances as CSV data. CSV column headers are generated from column names provided by the ResultSet itself, and their order matches the order of columns in the ResultSet.
Since:
1.17
Version:
1.0
Author:
matt
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(ResultSet resultSet)
    Export a ResultSet as CSV data.
    void
    write(ResultSet resultSet, org.supercsv.cellprocessor.ift.CellProcessor[] cellProcessors)
    Export a ResultSet as CSV data, using cell processors.

    Methods inherited from interface java.io.Closeable

    close

    Methods inherited from interface java.io.Flushable

    flush

    Methods inherited from interface org.supercsv.io.ICsvWriter

    getLineNumber, getRowNumber, writeComment, writeHeader
  • Method Details

    • write

      void write(ResultSet resultSet) throws SQLException, IOException
      Export a ResultSet as CSV data.
      Parameters:
      resultSet - The ResultSet to write.
      Throws:
      SQLException - If any SQL error occurs.
      IOException - If any IO error occurs.
    • write

      void write(ResultSet resultSet, org.supercsv.cellprocessor.ift.CellProcessor[] cellProcessors) throws SQLException, IOException
      Export a ResultSet as CSV data, using cell processors.
      Parameters:
      resultSet - The ResultSet to write.
      cellProcessors - An array of cell processors to handle each exported column. The length of the array should match the number and order of columns in the ResultSet. null values are permitted and indicate no processing should be performed on that column.
      Throws:
      SQLException - If any SQL error occurs.
      IOException - If any IO error occurs.