Examples of asScalarLong()


Examples of org.voltdb.VoltTable.asScalarLong()

        // check one table was returned
        assertEquals(1, results.length);
        // check one tuple was modified
        VoltTable result = results[0];
        assertNotNull(result);
        long stockCount = result.asScalarLong();
        // check count was 0 (should be, for we have empty stock and order-line tables.
        assertEquals(0L, stockCount);

        // Now we repeat the same thing, but adding a valid order-line.
        // long ol_o_id, long ol_d_id, long ol_w_id, long ol_number, long
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

                // check one table was returned
                assertEquals(1, results.length);
                // check one tuple was modified
                result = results[0];
                assertNotNull(result);
                stockCount = result.asScalarLong();
                // check count was 0 (should be, for we have an empty stock table.
                assertEquals(0L, stockCount);
            //
            // Otherwise it's the "hand-crafted" SLEV, which should return an error
            //
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        // check one table was returned
        assertEquals(1, results.length);
        // check one tuple was modified
        result = results[0];
        assertNotNull(result);
        stockCount = result.asScalarLong();
        // check count is 1
        assertEquals(1L, stockCount);

        // On more test: this test that Distinct is working properly.
        VoltTable[] ol2results = client.callProcedure("InsertOrderLine", 5L, 7L,
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        // check one table was returned
        assertEquals(1, results.length);
        // check one tuple was modified
        result = results[0];
        assertNotNull(result);
        stockCount = result.asScalarLong();
       
//        cr = client.callProcedure("GetOrderLineCount");
//        System.err.println(cr.toString());
//       
//        cr = client.callProcedure("GetStockCount");
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

                if (++batch_size > AuctionMarkConstants.BATCHSIZE_CLOSE_AUCTIONS_UPDATES) {
                    VoltTable updateResults[] = voltExecuteSQL();
                    for (int j = 0; j < updateResults.length; j++) {
                        VoltTable vt = updateResults[j];
                        assert(vt.getRowCount() == 0);
                        if (vt.asScalarLong() == 0) {
                            String msg = "Failed to process closed auctions\n" + voltLastQueriesExecuted()[j];
                            throw new VoltAbortException(msg);
                        }
                    } // FOR
                    batch_size = 0;
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

            }
            assert newOrder.getRowCount() == 1;

            result_offsets[(int) d_id - 1] = valid_neworders * 2;
            ++valid_neworders;
            final Long no_o_id = newOrder.asScalarLong();
            no_o_ids[(int) d_id - 1] = no_o_id;
            voltQueueSQL(getCId, no_o_id, d_id, w_id);
            voltQueueSQL(sumOLAmount, no_o_id, d_id, w_id);
        }
        final VoltTable[] otherresults = voltExecuteSQL();
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

                // No orders for this district: skip it. Note: This must be reported if > 1%
                continue;
            }
            assert newOrder.getRowCount() == 1;

            final Long no_o_id = newOrder.asScalarLong();
            no_o_ids[(int) d_id - 1] = no_o_id;
            voltQueueSQL(deleteNewOrder, d_id, w_id, no_o_id);
            voltQueueSQL(updateOrders, o_carrier_id, no_o_id, d_id, w_id);
            voltQueueSQL(updateOrderLine, timestamp, no_o_id, d_id, w_id);
        }
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        // check one table was returned
        assertEquals(1, results.length);
        // check one tuple was modified
        VoltTable result = results[0];
        assertNotNull(result);
        long stockCount = result.asScalarLong();
        // check count was 0 (should be, for we have empty stock and order-line
        // tables.
        assertEquals(0L, stockCount);

        // Now we repeat the same thing, but adding a valid order-line.
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

                // check one table was returned
                assertEquals(1, results.length);
                // check one tuple was modified
                result = results[0];
                assertNotNull(result);
                stockCount = result.asScalarLong();
                // check count was 0 (should be, for we have an empty stock table.
                assertEquals(0L, stockCount);
            //
            // Otherwise it's the "hand-crafted" SLEV, which should return an error
            //
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        // check one table was returned
        assertEquals(1, results.length);
        // check one tuple was modified
        result = results[0];
        assertNotNull(result);
        stockCount = result.asScalarLong();
        // check count is 1
        assertEquals(1L, stockCount);

        // On more test: this test that Distinct is working properly.
        VoltTable[] ol2results = client.callProcedure("InsertOrderLine", 5L, 7L,
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.