Interface TableReader

  • All Known Implementing Classes:
    ZipFileTableReader

    public interface TableReader
    Interface for reading database tables.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.Reader getReader​(java.sql.Statement statement, java.lang.String tableName)
      Get reader for a database table.
      java.util.List<java.lang.String> getTableNames​(java.sql.Connection connection)
      Returns a list of the names of all tables in the database.
    • Method Detail

      • getReader

        java.io.Reader getReader​(java.sql.Statement statement,
                                 java.lang.String tableName)
                          throws java.sql.SQLException
        Get reader for a database table.
        Parameters:
        statement - JDBC statement being executed.
        tableName - name of database table to read.
        Returns:
        reader for the table, csvjdbc will close the reader itself at the end.
        Throws:
        java.sql.SQLException - if table does not exist or cannot be read.
      • getTableNames

        java.util.List<java.lang.String> getTableNames​(java.sql.Connection connection)
                                                throws java.sql.SQLException
        Returns a list of the names of all tables in the database.
        Parameters:
        connection - JDBC connection.
        Returns:
        list of String values containing table names.
        Throws:
        java.sql.SQLException - if there is a problem creating table name list.