Package org.voltdb.catalog

Examples of org.voltdb.catalog.TableRef


                for (ConflictPair src_pair : src_conflicts.getReadwriteconflicts()) {
                    ConflictPair dest_pair = clone(src_pair, dest_db.getCatalog());
                    dest_pair.setStatement0(dest_proc.getStatements().get(src_pair.getStatement0().getName()));
                    dest_pair.setStatement1(dest_otherProc.getStatements().get(src_pair.getStatement1().getName()));
                    for (TableRef src_ref : src_pair.getTables()) {
                        TableRef dest_ref = dest_pair.getTables().add(src_ref.getName());
                        dest_ref.setTable(dest_db.getTables().get(src_ref.getTable().getName()));
                    } // FOR
                } // FOR
                for (ConflictPair src_pair : src_conflicts.getWritewriteconflicts()) {
                    ConflictPair dest_pair = clone(src_pair, dest_db.getCatalog());
                    dest_pair.setStatement0(dest_proc.getStatements().get(src_pair.getStatement0().getName()));
                    dest_pair.setStatement1(dest_otherProc.getStatements().get(src_pair.getStatement1().getName()));
                    for (TableRef src_ref : src_pair.getTables()) {
                        TableRef dest_ref = dest_pair.getTables().add(src_ref.getName());
                        dest_ref.setTable(dest_db.getTables().get(src_ref.getTable().getName()));
                    } // FOR
                } // FOR
            }
        } // FOR
    }
View Full Code Here


                cp.setAlwaysconflicting(c.alwaysConflicting);
                cp.setStatement0(c.stmt0);
                cp.setStatement1(c.stmt1);
                cp.setConflicttype(cType.getValue());
                for (Table table : c.tables) {
                    TableRef ref = cp.getTables().add(table.getName());
                    ref.setTable(table);
                }
            } // FOR
        } // FOR
    }
View Full Code Here

                    System.err.println(CatalogUtil.getDisplayName(ref0) + " <-> " + CatalogUtil.getDisplayName(ref1));
                this.checkFields(Column.class, ref0.getConstraint(), ref1.getConstraint());
            }
            // TableRefs
            else if (field_val0 instanceof TableRef) {
                TableRef ref0 = (TableRef) field_val0;
                TableRef ref1 = (TableRef) field_val1;
                if (debug)
                    System.err.println(CatalogUtil.getDisplayName(ref0) + " <-> " + CatalogUtil.getDisplayName(ref1));
                this.checkFields(Table.class, ref0.getTable(), ref1.getTable());
            }
            // ColumnRefs
            else if (field_val0 instanceof ColumnRef) {
                ColumnRef ref0 = (ColumnRef) field_val0;
                ColumnRef ref1 = (ColumnRef) field_val1;
                if (debug)
                    System.err.println(CatalogUtil.getDisplayName(ref0) + " <-> " + CatalogUtil.getDisplayName(ref1));
                this.checkFields(Column.class, ref0.getColumn(), ref1.getColumn());
            }
            // CatalogMap
            else if (field_val0 != null && ClassUtil.getSuperClasses(field_val0.getClass()).contains(CatalogType.class)) {
                CatalogType type0 = (CatalogType) field_val0;
                CatalogType type1 = (CatalogType) field_val1;
View Full Code Here

                assertEquals(conflict0.fullName(), conflict0.getStatement0().getName(), conflict1.getStatement0().getName());
                assertEquals(conflict0.fullName(), conflict0.getStatement1().getName(), conflict1.getStatement1().getName());
                assertEquals(conflict0.fullName(), conflict0.getAlwaysconflicting(), conflict1.getAlwaysconflicting());
                assertEquals(conflict0.fullName(), conflict0.getConflicttype(), conflict1.getConflicttype());
                for (TableRef ref0 : conflict0.getTables()) {
                    TableRef ref1 = conflict1.getTables().get(ref0.getName());
                    assertNotNull(ref0.fullName(), ref1);
                    assertEquals(ref0.fullName(), ref0.getTable().getName(), ref1.getTable().getName());
                } // FOR
            } // FOR
           
            assertEquals(cs0.getWritewriteconflicts().size(), cs1.getWritewriteconflicts().size());
            for (ConflictPair conflict0 : cs0.getWritewriteconflicts()) {
                ConflictPair conflict1 = cs1.getWritewriteconflicts().get(conflict0.getName());
                assertNotNull(conflict0.fullName(), conflict1);
                assertEquals(conflict0.fullName(), conflict0.getStatement0().getName(), conflict1.getStatement0().getName());
                assertEquals(conflict0.fullName(), conflict0.getStatement1().getName(), conflict1.getStatement1().getName());
                assertEquals(conflict0.fullName(), conflict0.getAlwaysconflicting(), conflict1.getAlwaysconflicting());
                assertEquals(conflict0.fullName(), conflict0.getConflicttype(), conflict1.getConflicttype());
                for (TableRef ref0 : conflict0.getTables()) {
                    TableRef ref1 = conflict1.getTables().get(ref0.getName());
                    assertNotNull(ref0.fullName(), ref1);
                    assertEquals(ref0.fullName(), ref0.getTable().getName(), ref1.getTable().getName());
                } // FOR
            } // FOR

        } // FOR
    }
View Full Code Here

TOP

Related Classes of org.voltdb.catalog.TableRef

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.