Class JdbcHelper
java.lang.Object
ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
- Direct Known Subclasses:
AddContentReferenceSourceFksFragment,AddForeignKeyIndexes,AddForeignKeyIndexFragment.Worker,CreateBusinessUnitFragment,CustomLanguageChange,FixCountersFragment,InitialValuesStatusFragment,MigrateIcalRecurrenceRuleChange,PostgreConstraintNames,RunFragmentChange,SingleToMultiRelationChange,SystemEntityCustomChange,YamlInitialValueCustomChange
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BooleanddlStatement(Connection conn, String ddl) protected booleantableExists(String tableName, Connection conn) protected booleanuniqueIndexExists(String tableName, String indexName, Connection conn) protected <T> TwithConnection(liquibase.database.Database database, JdbcHelper.SqlFunction<Connection, T> f) protected <T> TwithResultSet(Connection conn, String query, JdbcHelper.SqlFunction<ResultSet, T> f) protected <T> TwithStatement(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
-