public class Deduper extends Object
DedupeStrategy to delete those duplicates
Note:
1. Tables with composite keys are not supported.
2. This implementation doesn't scale well because it puts everything in memory and process DMLs one at a time| Constructor and Description |
|---|
Deduper(org.hibernate.SessionFactory sessionFactory,
com.atlassian.config.db.HibernateConfig hibernateConfig) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
multipleNullsNotAllowed()
Oracle and SQL Server behave differently from the rest: two rows that contain nulls for one or more key columns
and the same combination of values for the other key columns violate a unique constraint.
|
long |
removeDuplicates(String table,
String idColumn,
List<String> uniqueColumns,
DedupeStrategy dedupeStrategy)
Remove all duplicates of combination of
uniqueColumns from table. |
public Deduper(org.hibernate.SessionFactory sessionFactory,
com.atlassian.config.db.HibernateConfig hibernateConfig)
public long removeDuplicates(String table, String idColumn, List<String> uniqueColumns, DedupeStrategy dedupeStrategy) throws UpgradeException
uniqueColumns from table.
Note: names of tables and columns are not to be quoted.UpgradeExceptionpublic boolean multipleNullsNotAllowed()
Copyright © 2003–2022 Atlassian. All rights reserved.