object Diff
Responsible for calculating the difference between the 'ideal' and what is in the Database Cache.
- Alphabetic
- By Inheritance
- Diff
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class ColumnDataTypeDiff(existingDataType: jdbc.DataType.Value, newDataType: IdealDataType) extends ColumnDiff with Product with Serializable
When the 'ideal' data type is different than the column in the DB cache which shares the same column name.
- trait ColumnDiff extends AnyRef
Different ways the 'ideal' column can be different than the DB cache.
- case class ColumnNullableDiff(existingNullable: jdbc.YesNo.Value, newNullable: jdbc.YesNo.Value) extends ColumnDiff with Product with Serializable
When the 'ideal' column has a different nullable value than the DB cache
- case class ColumnRemarkDiff(existingRemark: Option[String], newRemark: Option[String]) extends ColumnDiff with Product with Serializable
When the 'ideal' column has a different remark than the DB cache
- case class DiffResult(tablesMissing: List[IdealTable], columnsMissing: List[(IdealTable, IdealColumn)], columnsDifferent: List[(IdealTable, IdealColumn, List[ColumnDiff])], primaryKeysMissing: List[(IdealTable, IdealColumn)], primaryKeysExtraneous: List[(IdealTable, PrimaryKey)], missingForeignKeys: List[IdealForeignKey], uniqueDiffs: List[(IdealTable, UniqueDiff)]) extends Product with Serializable
Container of all the Different difference between the 'ideal' and the cache.
Container of all the Different difference between the 'ideal' and the cache.
- tablesMissing
List of missing tables.
- columnsMissing
List of Missing column and which tables they should be associated to.
- columnsDifferent
List of columns in the cache which have different properties than the 'ideal'.
- primaryKeysMissing
List of missing primary Keys.
- primaryKeysExtraneous
List of extraneous primary keys.
- missingForeignKeys
List of missing Foreign keys.
- case class PrimaryKeyDiff(missing: List[IdealColumn], extraneousKeys: List[PrimaryKey]) extends Product with Serializable
When there are missing or extranious Primary Keys between the 'ideal' and the DB Cache
When there are missing or extranious Primary Keys between the 'ideal' and the DB Cache
- missing
The list of missing PrimaryKeys.
- extraneousKeys
The list of primary keys in the DB Cache which are not listed in the 'ideal'.
- case class UniqueDiff(columnGroup: List[IdealColumn]) extends Product with Serializable
When the 'ideal' unique constraint is different then the DB cache
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkArray(dataType: IdealDataType, column: Column): Boolean
Check the ideal type of the array compared to the metadata.
Check the ideal type of the array compared to the metadata. Most of the time we can ensure the sizes match (such as varchar(50) == string bounded to 50 characters) but in a few cases we can not compare the upper bound. In this case we say the two are equivalent if the metadata size is greater than the ideal size. TODO: This is most certainly PostgreSQL specific.
- dataType
The ideal type of the data in the array
- column
The jdbc metadata column
- returns
If the column is equivalent to the data type.
- Attributes
- protected
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compareColumn(column: IdealColumn, diffColumn: Column, indexInfos: List[IndexInfo]): List[ColumnDiff]
Compares two columns for differences, currently including data type, remarks or nullable.
Compares two columns for differences, currently including data type, remarks or nullable.
- column
The column prototype
- diffColumn
The cached column for comparison
- returns
List of differences
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def findDiff(databaseCache: DatabaseMetadataCache, protoSchema: IdealSchema): DiffResult
Give a database Cache and a Schema Prototype, find the list of changes needed to be made to the Database to be in sync with the Prototype.
Give a database Cache and a Schema Prototype, find the list of changes needed to be made to the Database to be in sync with the Prototype. This will only find adds and updates to the database. This will not report any structures in the existing database cache that is not part of the Schema Prototype.
- databaseCache
The Database Cache for comparison.
- protoSchema
The schema prototype -- what structures we want in our database.
- returns
DiffResult with the differences: * List of tables in the prototype which are not in the cache * List of columns in the prototype which are not in the cache * List of columns that are different in the prototype than in the cache * List of primary keys that are expected in the table cache * List of primary keys on extra on a table cache * List of foreign keys in the prototype which are not in the cache
- def findPrimaryKeyDifferences(databaseCache: DatabaseMetadataCache, schemaName: String, table: IdealTable, diffTable: Table): PrimaryKeyDiff
- def findUniqueConstraintDifferences(databaseCache: DatabaseMetadataCache, schemaName: String, table: IdealTable): List[UniqueDiff]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isEquivalent(idealDataType: IdealDataType, dataType: jdbc.DataType.Value, column: Column): Boolean
Goal is to determine if the JDBC type satisfies the specified DataType for the ProtoColumn
Goal is to determine if the JDBC type satisfies the specified DataType for the ProtoColumn
- idealDataType
What the data type should be.
- dataType
What the data type is in the cache.
- column
The column in the cache which contains the data type.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def missingVsExistingColumns(databaseCache: DatabaseMetadataCache, table: IdealTable, diffTable: Table): (List[IdealColumn], List[(IdealColumn, Column)])
Compare the two tables and try to find a cached column which matches each of the columns in the protoype table.
Compare the two tables and try to find a cached column which matches each of the columns in the protoype table.
- databaseCache
The cache used for lookup.
- table
The table prototype, what we want the table to look like
- diffTable
The cached table
- returns
Pair of List where _1 is the List of columns not found in the cache and _2 is the pair of matching prototype/existing columns
- def missingVsExistingTables(databaseCache: DatabaseMetadataCache, schemaName: String, tables: List[IdealTable]): (List[IdealTable], List[(IdealTable, Table)])
Traverses through the table prototypes and tries to find a table in the cache with same same name and in the same schema.
Traverses through the table prototypes and tries to find a table in the cache with same same name and in the same schema.
- databaseCache
The cache, to look up tables.
- schemaName
The name of the prototype schema
- tables
The list of prototype tables we are looking up in the cache
- returns
Tuple2 where _1 is the list of missing tables and _2 is the list of pair of the prototype table and the cached table.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object PrimaryKeyDiff extends Serializable