private static void dropIndex(DbConnection dbConn, String tblName, String indexName) { try { DbTableFns.dropIndex(dbConn, tblName, indexName); } catch (Exception e) { } }
// ************************************************************************** public static void createTable(DbConnection dbConn) throws Exception { String indexName, indexName2, indexName3; String colNamesIndex, colNamesIndex2, colNamesIndex3; DbIndexDef indexDef, indexDef2, indexDef3; indexName = TN + "1"; colNamesIndex = "ID"; indexName2 = TN + "2"; colNamesIndex2 = "NAME"; indexName3 = TN + "3"; colNamesIndex3 = "DEPTID"; indexDef = new DbIndexDef(indexName, colNamesIndex, true); indexDef2 = new DbIndexDef(indexName2, colNamesIndex2, true); indexDef3 = new DbIndexDef(indexName3, colNamesIndex3, false); DbTableFns.createTable(dbConn, TN, ACD); DbTableFns.createIndex(dbConn, TN, indexDef); DbTableFns.createIndex(dbConn, TN, indexDef2); DbTableFns.createIndex(dbConn, TN, indexDef3); }
public static void dropTable(DbConnection dbConn) throws Exception { String indexName, indexName2, indexName3; indexName = TN + "1"; indexName2 = TN + "2"; indexName3 = TN + "3"; dropIndex(dbConn, TN, indexName); dropIndex(dbConn, TN, indexName2); dropIndex(dbConn, TN, indexName3); DbTableFns.dropTable(dbConn, TN); }