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) |
public Connection getConnection() throws SQLException
IOException
SQLException
public String getJDBCDriverClass()
public boolean dropTableIfExists(Connection conn, String tableName) throws SQLException
SQLException
public String getConnectionString()
public Set<String> getTables(Connection connection) throws SQLException
SQLException
@Deprecated public static int insert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data) throws SQLException
SQLException
public static void batchInsert(PreparedStatement insertStatement, TableInfo table, Map<Cols,String> data) throws SQLException
SQLException
public static void updateInsertStatement(int dbColOffset, PreparedStatement st, ColInfo colInfo, String value) throws SQLException
SQLException
public void createTables(List<TableInfo> tableInfos, JDBCUtil.CREATE_TABLE createTable) throws SQLException, IOException
SQLException
IOException
public boolean containsTable(String tableName) throws SQLException
SQLException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.