Package org.databene.mad4db.cmd

Examples of org.databene.mad4db.cmd.TableChange


  public void testIndexColumnRemoved() {
    // given a table with an index of which one column was removed
    DBTable table = createTableWithColumns("tbl", 2);
    DBIndex index1 = new DBNonUniqueIndex("idx", true, table, "col1", "col2");
    DBIndex index2 = new DBNonUniqueIndex("idx", true, table, "col1");
    TableChange tableChange = new TableChange(table, null);
    // when performing a comparison
    new IndexComparator(config).compareObjects(index1, index2, tableChange);
    // then the result must be a ColumnsRemoval
    System.out.println(tableChange);
    List<StructuralChange<?>> indexSubChanges = assertSingleSubChangeAndGetItsSubChanges(IndexChange.class,
View Full Code Here


    DBTable table1 = new DBTable("tbl");
    DBColumn col1 = createIntColumn("col1", table1);
    DBTable table2 = new DBTable("tbl");
    DBColumn col2 = createIntColumn("col1", table2);
    // when performing a comparison
    TableChange tableChange = new TableChange(table1, null);
    new TableColumnComparator(config).compareObjects(col1, col2, tableChange);
    // then the result must be empty
    System.out.println(tableChange);
    List<StructuralChange<?>> subChanges = tableChange.getSubChanges();
    assertEquals(0, subChanges.size());
  }
View Full Code Here

    DBTable table1 = new DBTable("tbl");
    DBColumn col1 = createVarcharColumn("col1", table1);
    DBTable table2 = new DBTable("tbl");
    DBColumn col2 = createIntColumn("col1", table2);
    // when performing a comparison
    TableChange tableChange = new TableChange(table1, null);
    new TableColumnComparator(config).compareObjects(col1, col2, tableChange);
    // then the result must be empty
    System.out.println(tableChange);
    List<StructuralChange<?>> subChanges = assertSingleSubChangeAndGetItsSubChanges(
        ColumnChange.class, DBColumn.class, "col1", ChangeSeverity.RESTRICTION, tableChange);
View Full Code Here

TOP

Related Classes of org.databene.mad4db.cmd.TableChange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.