Class JdbcHelper
java.lang.Object
ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
- Direct Known Subclasses:
AddContentReferenceSourceFksFragment
,AddForeignKeyIndexes
,AddForeignKeyIndexFragment.Worker
,CreateBusinessUnitFragment
,CustomLanguageChange
,DeleteLargeSearchTextChange
,FixCountersFragment
,InitialValuesStatusFragment
,PostgreConstraintNames
,RunFragmentChange
,SingleToMultiRelationChange
,SystemEntityCustomChange
,YamlInitialValueCustomChange
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Boolean
ddlStatement
(Connection conn, String ddl) protected boolean
tableExists
(String tableName, Connection conn) protected boolean
uniqueIndexExists
(String tableName, String indexName, Connection conn) protected <T> T
withConnection
(liquibase.database.Database database, JdbcHelper.SqlFunction<Connection, T> f) protected <T> T
withResultSet
(Connection conn, String query, JdbcHelper.SqlFunction<ResultSet, T> f) protected <T> T
withStatement
(Connection conn, int resultSetType, int rsConcurrency, JdbcHelper.SqlFunction<Statement, T> f)
-
Constructor Details
-
JdbcHelper
public JdbcHelper()
-
-
Method Details
-
withConnection
protected <T> T withConnection(liquibase.database.Database database, JdbcHelper.SqlFunction<Connection, T> f) -
withResultSet
-
withStatement
protected <T> T withStatement(Connection conn, int resultSetType, int rsConcurrency, JdbcHelper.SqlFunction<Statement, T> f) -
ddlStatement
-
tableExists
- Throws:
SQLException
-
uniqueIndexExists
protected boolean uniqueIndexExists(String tableName, String indexName, Connection conn) throws SQLException - Throws:
SQLException
-