Package alpine.server.util
Class DbUtil
java.lang.Object
alpine.server.util.DbUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose(Connection connection) static voidstatic voidstatic booleancolumnExists(Connection connection, String tableName, String columnName) static voidcreateTable(AbstractAlpineQueryManager qm, Class... classes) static voiddropColumn(Connection connection, String tableName, String columnName) static voiddropTable(Connection connection, String tableName) static voidexecuteUpdate(Connection connection, String statement) getColumnNames(Connection connection, String tableName) getTableNames(Connection connection) static voidinitPlatformName(Connection connection) static booleanisH2()static booleanisMssql()static booleanisMysql()static booleanisOracle()static booleanstatic voidrollback(Connection connection) static booleantableExists(Connection connection, String tableName)
-
Constructor Details
-
DbUtil
public DbUtil()
-
-
Method Details
-
rollback
-
close
-
close
-
close
-
initPlatformName
-
isH2
public static boolean isH2() -
isMssql
public static boolean isMssql() -
isMysql
public static boolean isMysql() -
isOracle
public static boolean isOracle() -
isPostgreSQL
public static boolean isPostgreSQL() -
dropColumn
-
dropTable
-
executeUpdate
- Throws:
SQLException
-
getTableNames
- Throws:
SQLException
-
tableExists
- Throws:
SQLException
-
getColumnNames
public static ArrayList<String> getColumnNames(Connection connection, String tableName) throws SQLException - Throws:
SQLException
-
columnExists
public static boolean columnExists(Connection connection, String tableName, String columnName) throws SQLException - Throws:
SQLException
-
createTable
-