Package com.foundationdb.qp.exec

Examples of com.foundationdb.qp.exec.UpdateResult


                row(customerRowType, new Object[]{0, "zzz"}),
                row(customerRowType, new Object[]{3, "jkl"}),
                row(customerRowType, new Object[]{5, "ooo"})
        };
        UpdatePlannable insertPlan = insert_Default(rowsToValueScan(rows));
        UpdateResult result = insertPlan.run(queryContext, queryBindings);
        assertEquals("rows touched", rows.length, result.rowsTouched());
        assertEquals("rows modified", rows.length, result.rowsModified());
    }
View Full Code Here


            }
        };

        Operator groupScan = groupScan_Default(coi);
        UpdatePlannable updateOperator = update_Default(groupScan, updateFunction);
        UpdateResult result = updateOperator.run(queryContext, queryBindings);
        assertEquals("rows modified", 2, result.rowsModified());
        assertEquals("rows touched", db.length, result.rowsTouched());

        Cursor executable = cursor(groupScan, queryContext, queryBindings);
        Row[] expected = new Row[]{row(customerRowType, 1L, "XYZXYZ"),
                                   row(orderRowType, 11L, 1L, "ori"),
                                   row(itemRowType, 111L, 11L),
View Full Code Here

                    return new OverlayingRow(original).overlay(0, id - 100);
                }
            };

        UpdatePlannable updateOperator = update_Default(scan, updateFunction);
        UpdateResult result = updateOperator.run(queryContext, queryBindings);
        assertEquals("rows touched", 8, result.rowsTouched());
        assertEquals("rows modified", 8, result.rowsModified());

        Cursor executable = cursor(scan, queryContext, queryBindings);
        Row[] expected = new Row[] {
            row(itemRowType, 11L, 11L),
            row(itemRowType, 12L, 11L),
View Full Code Here

            public boolean rowIsSelected(Row row) {
                return true;
            }
        };
        UpdatePlannable insertPlan = update_Default(rowsToValueScan(rows), updateFunction);
        UpdateResult result = insertPlan.run(queryContext, queryBindings);
        assertEquals("rows touched", rows.length, result.rowsTouched());
        assertEquals("rows modified", rows.length, result.rowsModified());
    }
View Full Code Here

    private void doDelete() {
        Row[] rows = {
                row(customerRowType, new Object[]{2, "abc"})
        };
        UpdatePlannable insertPlan = delete_Default(rowsToValueScan(rows));
        UpdateResult result = insertPlan.run(queryContext, queryBindings);
        assertEquals("rows touched", rows.length, result.rowsTouched());
        assertEquals("rows modified", rows.length, result.rowsModified());
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.exec.UpdateResult

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.