Package org.apache.tika.eval.db
Class JDBCUtil
- java.lang.Object
-
- org.apache.tika.eval.db.JDBCUtil
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JDBCUtil.CREATE_TABLE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsTable(String tableName)
void
createTables(List<TableInfo> tableInfos, JDBCUtil.CREATE_TABLE createTable)
boolean
dropTableIfExists(Connection conn, String tableName)
Connection
getConnection()
Override this any optimizations you want to do on the db before writing/reading.String
getConnectionString()
String
getJDBCDriverClass()
JDBC driver class.Set<String>
getTables(Connection connection)
static int
insert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data)
static void
updateInsertStatement(int dbColOffset, PreparedStatement st, ColInfo colInfo, String value)
-
-
-
Method Detail
-
getConnection
public Connection getConnection() throws SQLException
Override this any optimizations you want to do on the db before writing/reading.- Returns:
- Throws:
IOException
SQLException
-
getJDBCDriverClass
public String getJDBCDriverClass()
JDBC driver class. Override as necessary.- Returns:
-
dropTableIfExists
public boolean dropTableIfExists(Connection conn, String tableName) throws SQLException
- Throws:
SQLException
-
getConnectionString
public String getConnectionString()
-
getTables
public Set<String> getTables(Connection connection) throws SQLException
- Throws:
SQLException
-
insert
public static int insert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data) throws SQLException
- Throws:
SQLException
-
updateInsertStatement
public static void updateInsertStatement(int dbColOffset, PreparedStatement st, ColInfo colInfo, String value) throws SQLException
- Throws:
SQLException
-
createTables
public void createTables(List<TableInfo> tableInfos, JDBCUtil.CREATE_TABLE createTable) throws SQLException, IOException
- Throws:
SQLException
IOException
-
containsTable
public boolean containsTable(String tableName) throws SQLException
- Throws:
SQLException
-
-