Examples of asScalarLong()


Examples of org.voltdb.VoltTable.asScalarLong()

        for (Integer fragmentId : fragmentIds) {
            long expected = expectedValues.get(fragmentId);
            VoltTable cacheResult = this.cache.getResult(txnId, fragmentId, partitionId, params);
            assertNotNull(fragmentId.toString(), cacheResult);
            assertEquals(1, cacheResult.getRowCount());
            assertEquals(expected, cacheResult.asScalarLong());
        } // FOR
       
        // If we change the params, we should never get back our results
        params = new ParameterSet("WuTang!", 1981);
        for (Integer fragmentId : fragmentIds) {
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        for (Integer fragmentId : fragmentIds) {
            long expected = expectedValues.get(fragmentId);
            VoltTable cacheResult = this.cache.getResult(txnId, fragmentId, partitionId, params);
            assertNotNull(fragmentId.toString(), cacheResult);
            assertEquals(1, cacheResult.getRowCount());
            assertEquals(expected, cacheResult.asScalarLong());
        } // FOR
    }
}
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        ClientResponse cr;
       
        cr = client.callProcedure(procName, "INSERT INTO NEW_ORDER VALUES (1, 1, 1);");
        VoltTable modCount = cr.getResults()[0];
        assertTrue(modCount.getRowCount() == 1);
        assertTrue(modCount.asScalarLong() == 1);

        cr = client.callProcedure(procName, "SELECT * FROM NEW_ORDER;");
        VoltTable result = cr.getResults()[0];
        assertTrue(result.getRowCount() == 1);
        // System.out.println(result.toString());
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        // String w_city, String w_zip, double w_tax, long w_ytd
        VoltTable warehouse = client.callProcedure("InsertWarehouse", W_ID,
                "EZ Street WHouse", "Headquarters", "77 Mass. Ave.",
                "Cambridge", "AZ", "12938", W_TAX, 18837.57).getResults()[0];
        // check for successful insertion.
        assertEquals(1L, warehouse.asScalarLong());

        final double D_TAX = 0.0825;
        final int D_NEXT_O_ID = 21;
        // long d_id, long d_w_id, String d_name, String d_street_1, String
        // d_street_2, String d_city, String d_state, String d_zip, double
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        // d_tax, double d_ytd, long d_next_o_id
        VoltTable district = client.callProcedure("InsertDistrict", D_ID, W_ID,
                "A District", "Street Addy", "meh", "westerfield", "BA",
                "99999", D_TAX, 15241.45, D_NEXT_O_ID).getResults()[0];
        // check that a district was inserted
        assertEquals(1L, district.asScalarLong());

        final double C_DISCOUNT = 0.13;
        // long c_id, long c_d_id, long c_w_id, String c_first, String c_middle,
        // String c_last, String c_street_1, String c_street_2, String d_city,
        // String d_state, String d_zip, String c_phone, Date c_since, String
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

                W_ID, "I", "Is", "Name", "Place", "Place2", "BiggerPlace",
                "AL", "91083", "(913) 909 - 0928", new TimestampType(), "GC",
                19298943.12, C_DISCOUNT, 15.75, 18832.45, 45L, 15L,
                "Some History").getResults()[0];
        // check for successful insertion.
        assertEquals(1L, customer.asScalarLong());

        final int[] s_quantities = { 45, 85, 15 };
        final long INITIAL_S_YTD = 5582L;
        final long INITIAL_S_ORDER_CNT = 152L;
        // long pkey, long s_i_id, long s_w_id, long s_quantity, String
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        assertEquals(1L, stock1.asScalarLong());
        assertEquals(1L, stock2.asScalarLong());
        assertEquals(1L, stock3.asScalarLong());
        assertEquals(1L, item1.asScalarLong());
        assertEquals(1L, item2.asScalarLong());
        assertEquals(1L, item3.asScalarLong());

        // call the neworder transaction:
        // if(ol_supply_w_id != w_id) all_local = 0;
        // test all_local behavior, first, then remote warehouse situation.
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        final double initialYTD = 15241.45;
        VoltTable district = client.callProcedure("InsertDistrict", D_ID, W_ID,
                "A District", "Street Addy", "meh", "westerfield", "BA",
                "99999", .0825, initialYTD, 21L).getResults()[0];
        // check that a district was inserted
        assertEquals(1L, district.asScalarLong());

        // long w_id, String w_name, String w_street_1, String w_street_2,
        // String w_city, String w_zip, double w_tax, long w_ytd
        VoltTable warehouse = client.callProcedure("InsertWarehouse", W_ID,
                "EZ Street WHouse", "Headquarters", "77 Mass. Ave.",
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

        // String w_city, String w_zip, double w_tax, long w_ytd
        VoltTable warehouse = client.callProcedure("InsertWarehouse", W_ID,
                "EZ Street WHouse", "Headquarters", "77 Mass. Ave.",
                "Cambridge", "AZ", "12938", .1234, initialYTD).getResults()[0];
        // check for successful insertion.
        assertEquals(1L, warehouse.asScalarLong());

        // long c_id, long c_d_id, long c_w_id, String c_first, String c_middle,
        // String c_last, String c_street_1, String c_street_2, String d_city,
        // String d_state, String d_zip, String c_phone, Date c_since, String
        // c_credit, double c_credit_lim, double c_discount, double c_balance,
View Full Code Here

Examples of org.voltdb.VoltTable.asScalarLong()

                W_ID, "I", "Be", "lastname", "Place", "Place2", "BiggerPlace",
                "AL", "91083", "(193) 099 - 9082", new TimestampType(), "BC",
                19298943.12, .13, initialBalance, initialYTD, 0L, 15L,
                "Some History").getResults()[0];
        // check for successful insertion.
        assertEquals(1L, customer1.asScalarLong());

        VoltTable customer2 = client.callProcedure("InsertCustomer", C_ID + 1,
                D_ID, W_ID, "We", "R", "Customer", "Random Department",
                "Place2", "BiggerPlace", "AL", "13908", "(913) 909 - 0928",
                new TimestampType(), "GC", 19298943.12, .13, initialBalance, initialYTD,
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.