Package com.foundationdb.qp.operator

Examples of com.foundationdb.qp.operator.StoreAdapter.newGroupCursor()


        writeRow(tids.i, iCols);
        compareRows( new Row[] { iRow, oOrigRow, o1Row, cRow }, adapter.newGroupCursor(cType.table().getGroup()) );

        // updated o moves after o1 and adopts i
    updateRow(oOrigRow, oUpdateRow);
        compareRows( new Row[] { o1Row, cRow, oUpdateRow, iRow }, adapter.newGroupCursor(cType.table().getGroup()) );
    }

    protected void compareRows(Row[] expected, Cursor cursor) {
        txnService().beginTransaction(session());
        try {
View Full Code Here


            new TestRow(t2Type, r102),
            new TestRow(t1Type, r2),
            new TestRow(t2Type, r201),
            new TestRow(t2Type, r202)
        };
        compareRows(expected, adapter.newGroupCursor(t1Type.table().getGroup()));
        txnService().commitTransaction(session());
    }

    protected List<Object> treeTuples(HasStorage object) {
        byte[] prefix = ((FDBStorageDescription)object.getStorageDescription()).getPrefixBytes();
View Full Code Here

        Row[] expected = {
            new TestRow(t1Type, r1),
            new TestRow(t1Type, r2)
        };
        compareRows(expected, adapter.newGroupCursor(t1Type.table().getGroup()));

        txnService().commitTransaction(session());
    }
   
    @Test
View Full Code Here

            new TestRow(parentType, r1),
            new TestRow(childType, r1a),
            new TestRow(childType, r1b),
            new TestRow(parentType, r2)
        };
        compareRows(expected, adapter.newGroupCursor(parentType.table().getGroup()));

        txnService().commitTransaction(session());
    }

}
View Full Code Here

                        testRow(oType, 10, 1, 11, pk++),
                        testRow(oType, 11, 1, 12, pk++),
                        testRow(cType, 2, "b"),
                        testRow(oType, 30, 3, 33, pk++),
                },
                adapter.newGroupCursor(cType.table().getGroup())
        );
        compareRows(
                new Row[]{
                        testRow(iType, 100, 10, 110),
                        testRow(iType, 101, 10, 111),
View Full Code Here

                        testRow(iType, 100, 10, 110),
                        testRow(iType, 101, 10, 111),
                        testRow(iType, 111, 11, 122),
                        testRow(iType, 300, 30, 330)
                },
                adapter.newGroupCursor(iType.table().getGroup())
        );
    }

    @Test
    public void cannotAddNotNullWithNoDefault() throws StandardException {
View Full Code Here

                        // no c6
                            testRow(oType, 60, 6, "c"),
                        testRow(cType, 10, "zxcv")

                },
                adapter.newGroupCursor(cType.table().getGroup())
        );
    }

    @Test
    public void simpleDropGroupingForeignKey() throws StandardException {
View Full Code Here

                new Row[] {
                        testRow(cType, 1L, "asdf"),
                        testRow(cType, 5, "qwer"),
                        testRow(cType, 10, "zxcv")
                },
                adapter.newGroupCursor(cType.table().getGroup())
        );
        compareRows(
                new Row[] {
                        testRow(oType, 10, 1, "a"),
                        testRow(oType, 11, 1, "b"),
View Full Code Here

                new Row[] {
                        testRow(oType, 10, 1, "a"),
                        testRow(oType, 11, 1, "b"),
                        testRow(oType, 60, 6, "c"),
                },
                adapter.newGroupCursor(oType.table().getGroup())
        );
    }

    @Test
    public void addGroupingForeignKeyToExistingParent() throws StandardException {
View Full Code Here

                        testRow(cType, 5, "qwer"),
                        // null
                            testRow(oType, 60, 6, "c"),
                        testRow(cType, 10, "zxcv"),
                },
                adapter.newGroupCursor(cType.table().getGroup())
        );
    }

    @Test
    public void dropGroupingForeignKeyMiddleOfGroup() throws StandardException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.