Package org.apache.tika.eval.app.db
Class JDBCUtil
- java.lang.Object
-
- org.apache.tika.eval.app.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 Deprecated Methods Modifier and Type Method Description static void
batchInsert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data)
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)
Deprecated.static void
updateInsertStatement(int dbColOffset, PreparedStatement st, ColInfo colInfo, String value)
-
-
-
Method Detail
-
insert
@Deprecated public static int insert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data) throws SQLException
Deprecated.- Throws:
SQLException
-
batchInsert
public static void batchInsert(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
-
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
-
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
-
-