Packages

object Diff

Responsible for calculating the difference between the 'ideal' and what is in the Database Cache.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Diff
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. 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.

  2. trait ColumnDiff extends AnyRef

    Different ways the 'ideal' column can be different than the DB cache.

  3. 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

  4. 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

  5. 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.

  6. 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'.

  7. case class UniqueDiff(columnGroup: List[IdealColumn]) extends Product with Serializable

    When the 'ideal' unique constraint is different then the DB cache

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. 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

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. 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

  12. def findPrimaryKeyDifferences(databaseCache: DatabaseMetadataCache, schemaName: String, table: IdealTable, diffTable: Table): PrimaryKeyDiff
  13. def findUniqueConstraintDifferences(databaseCache: DatabaseMetadataCache, schemaName: String, table: IdealTable): List[UniqueDiff]
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. 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.

  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. 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

  19. 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.

  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. object PrimaryKeyDiff extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped