Package org.jumpmind.symmetric.io
Class DbCompare
java.lang.Object
org.jumpmind.symmetric.io.DbCompare
DbCompare has the ability to compare two SQL-based datasources and output a report of of differences, and optionally SQL to bring the target into sync with
the source.
-
Constructor Summary
ConstructorsConstructorDescriptionDbCompare(ISymmetricEngine sourceEngine, ISymmetricEngine targetEngine, DbCompareConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildOrderBy(Table table, Column[] sortByColumns, IDatabasePlatform platform, boolean isSource) protected TablecloneTable(Table table) compare()protected intcomparePk(DbCompareTables tables, DbCompareRow sourceCompareRow, DbCompareRow targetCompareRow) protected booleancompareTableNames(String sourceTableName, String targetTableName) protected DbCompareReport.TableReportcompareTables(DbCompareTables tables, OutputStream sqlDiffOutput) filterTables(List<String> tables) protected StringgetComparisonSQL(Table table, Column[] sortByColumns, IDatabasePlatform platform, String whereClause, boolean isSource) protected StringgetSourceComparisonSQL(DbCompareTables tables, IDatabasePlatform platform) protected OutputStreamprotected OutputStreamprotected List<DbCompareTables>protected StringgetTargetComparisonSQL(DbCompareTables tables, IDatabasePlatform platform) getTransformFor(Table sourceTable) protected TriggerRoutergetTriggerRouterFor(Table sourceTable) protected List<DbCompareTables>loadTables(List<String> tableNames, List<String> targetTableNames) protected List<DbCompareTables>protected List<DbCompareTables>protected TableloadTargetTable(DbCompareTables tables, String targetTableName) protected Tableprotected booleanmapPrimaryKey(DbCompareTables tables) protected void
-
Constructor Details
-
DbCompare
public DbCompare(ISymmetricEngine sourceEngine, ISymmetricEngine targetEngine, DbCompareConfig config)
-
-
Method Details
-
compare
-
getSqlDiffOutputStream
-
getSqlDiffOutputStream
-
compareTables
protected DbCompareReport.TableReport compareTables(DbCompareTables tables, OutputStream sqlDiffOutput) -
modifyRowForUnitypes
-
comparePk
protected int comparePk(DbCompareTables tables, DbCompareRow sourceCompareRow, DbCompareRow targetCompareRow) -
getSourceComparisonSQL
-
getTargetComparisonSQL
-
getComparisonSQL
protected String getComparisonSQL(Table table, Column[] sortByColumns, IDatabasePlatform platform, String whereClause, boolean isSource) -
buildOrderBy
protected String buildOrderBy(Table table, Column[] sortByColumns, IDatabasePlatform platform, boolean isSource) -
getTablesToCompare
-
loadTablesFromConfig
-
loadTables
-
mapPrimaryKey
-
loadTargetTable
-
getTriggerRouterFor
-
getTransformFor
-
loadTargetTableUsingTransform
protected Table loadTargetTableUsingTransform(TransformService.TransformTableNodeGroupLink transform) -
cloneTable
-
loadTablesFromArguments
-
filterTables
-
compareTableNames
-
getConfig
-