Class DBUtilities
java.lang.Object
com.inductiveautomation.ignition.gateway.util.DBUtilities
Static utility functions pertaining to the database.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidclose(Connection conn) static voidclose(Connection conn, Statement stmt) Silently close the given connection and statement.static voidstatic voidstatic intgetJdbcType(DataType type) static ObjectgetParameterValue(CallableStatement stmt, int index, int dbType) static ObjectgetParameterValue(CallableStatement stmt, String paramName, int dbType) This class is necessary because some db connectors don't correctly support CallableStatement.getObject(string) [MYSQL is one, which always returns byte[2]]static DataTypegetTypeForJDBC(int jdbcType) static booleanisDataManipulationQuery(String query) Returns false if query is SELECT, otherwise true.static voidrollback(Connection conn) 
- 
Constructor Details- 
DBUtilitiespublic DBUtilities()
 
- 
- 
Method Details- 
getParameterValuepublic static Object getParameterValue(CallableStatement stmt, String paramName, int dbType) throws SQLException This class is necessary because some db connectors don't correctly support CallableStatement.getObject(string) [MYSQL is one, which always returns byte[2]]- Throws:
- SQLException
 
- 
getParameterValuepublic static Object getParameterValue(CallableStatement stmt, int index, int dbType) throws SQLException - Throws:
- SQLException
 
- 
closeSilently close the given connection and statement.
- 
rollback
- 
close
- 
close
- 
close
- 
isDataManipulationQueryReturns false if query is SELECT, otherwise true.
- 
getJdbcType
- 
getTypeForJDBC
 
-