| Modifier and Type | Class and Description |
|---|---|
static class |
JDBCUtil.CREATE_TABLE |
| Constructor and Description |
|---|
JDBCUtil(String connectionString,
String driverClass) |
| Modifier and Type | Method and 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) |
@Deprecated public static int insert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data) throws SQLException
SQLExceptionpublic static void batchInsert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data) throws SQLException
SQLExceptionpublic static void updateInsertStatement(int dbColOffset,
PreparedStatement st,
ColInfo colInfo,
String value)
throws SQLException
SQLExceptionpublic Connection getConnection() throws SQLException
IOExceptionSQLExceptionpublic String getJDBCDriverClass()
public boolean dropTableIfExists(Connection conn, String tableName) throws SQLException
SQLExceptionpublic String getConnectionString()
public Set<String> getTables(Connection connection) throws SQLException
SQLExceptionpublic void createTables(List<TableInfo> tableInfos, JDBCUtil.CREATE_TABLE createTable) throws SQLException, IOException
SQLExceptionIOExceptionpublic boolean containsTable(String tableName) throws SQLException
SQLExceptionCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.