Package org.relique.io
Interface TableReader
-
- All Known Implementing Classes:
ClasspathTableReader
,ZipFileTableReader
public interface TableReader
Interface for reading database tables.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Reader
getReader(Statement statement, String tableName)
Get reader for a database table.List<String>
getTableNames(Connection connection)
Returns a list of the names of all tables in the database.
-
-
-
Method Detail
-
getReader
Reader getReader(Statement statement, String tableName) throws 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:
SQLException
- if table does not exist or cannot be read.
-
getTableNames
List<String> getTableNames(Connection connection) throws 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:
SQLException
- if there is a problem creating table name list.
-
-