Interface DedupeStrategy
-
- All Known Implementing Classes:
JustFailDedupeStrategy,KeepBiggestIdDedupeStrategy,KeepOneDedupeStrategy,KeepSmallestIdDedupeStrategy,MergeToSmallestIdDedupeStrategy
public interface DedupeStrategyDecide how to remove duplicates so a unique constraint can be added Note: Tables with composite keys are not supported.- Since:
- 7.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidperform(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, SortedSet<Object> ids)Remove duplicates so a unique constraint can be added
-
-
-
Method Detail
-
perform
void perform(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, SortedSet<Object> ids) throws UpgradeExceptionRemove duplicates so a unique constraint can be added- Parameters:
jdbcTemplate- AJdbcTemplateto be usedids- Set of Ids of duplicate rows in DB. Upon invocation of this method, only one of them can remain in the DB. All Confluence primary keys are of type Long or String so they can be used inSortedSet.- Throws:
UpgradeException- Thrown if there is any error removing duplicates, will cancel the constraint adding process
-
-