Package org.voltdb

Examples of org.voltdb.VoltTableRow


                    successfulPutsMPT.incrementAndGet();
                else
                    successfulPutsMPF.incrementAndGet();

                final VoltTable pairData = response.getResults()[0];
                final VoltTableRow tablerow = pairData.fetchRow(0);
                final long counter = tablerow.getLong(0);
                hashMap.put(thisPair.Key, counter);
                lastSuccessfulResponse = System.currentTimeMillis();
            }
            else {
                failedPuts.incrementAndGet();
View Full Code Here


                continue;
            }
            assert otherresults[resultoffset + 0].getRowCount() == 1;
            assert otherresults[resultoffset + 1].getRowCount() == 1;
            final long c_id = (otherresults[resultoffset + 0].asScalarLong());
            final VoltTableRow row = otherresults[resultoffset + 1].fetchRow(0);
            final double ol_total = row.getDouble(0);
            final boolean ol_total_wasnull = row.wasNull();

            // If there are no order lines, SUM returns null. There should always be order lines.
            if (ol_total_wasnull) {
                throw new VoltAbortException(
                        "ol_total is NULL: there are no order lines. This should not happen");
            }
            assert ol_total > 0.0;

            voltQueueSQL(updateCustomer, ol_total, c_id, d_id, W_ID);

            final Long no_o_id = no_o_ids[(int) d_id - 1];
            result.addRow(d_id, no_o_id);
        }
        voltExecuteSQL();

        VoltTableRow r = result.fetchRow(0);
        assert(D_ID == r.getLong(0));
        assert(O_ID == r.getLong(1));

        return null;
    }
View Full Code Here

            if (clientResponse.getStatus() != ClientResponse.SUCCESS) {
                System.err.printf(clientResponse.getStatusString());
                System.err.flush();
                System.exit(-1);
            }
            VoltTableRow row = clientResponse.getResults()[0].fetchRow(0);
            rows.addAndGet(row.getLong(0));
            nanos.addAndGet(row.getLong(1));
            scans.incrementAndGet();
        }
View Full Code Here

            // verify that the row was inserted
            try {
                final VoltTable[] result = client.callProcedure("Select",
                        "ALLOW_NULLS", pkey.get()).getResults();
                final VoltTableRow row = result[0].fetchRow(0);
                for (int i = 0; i < COLS; ++i) {
                    final Object obj = row.get(i + 1, m_types[i]);
                    if (i == k) {
                        assertTrue(row.wasNull());
                        System.out.println("Row " + i + " verifed as NULL");
                    } else {
                        assertTrue(comparisonHelper(obj, params[i + 2],
                                m_types[i]));
                    }
View Full Code Here

            }

            // verify that the row was updated
            final VoltTable[] result = client.callProcedure("Select",
                    "ALLOW_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i = 0; i < COLS; ++i) {
                final Object obj = row.get(i + 1, m_types[i]);
                if (i == k) {
                    assertTrue(row.wasNull());
                } else {
                    assertTrue(comparisonHelper(obj, params[i + 2], m_types[i]));
                }
            }
        }
View Full Code Here

            }

            // verify that the row was updated
            final VoltTable[] result = client.callProcedure("Select",
                    "ALLOW_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i = 0; i < COLS; ++i) {
                final Object obj = row.get(i + 1, m_types[i]);
                assertTrue(comparisonHelper(obj, params[i + 2], m_types[i]));
            }
        }
    }
View Full Code Here

            fail();
        }

        VoltTable[] result = client.callProcedure("Select", "WITH_DEFAULTS",
                pkey.get()).getResults();
        VoltTableRow row = result[0].fetchRow(0);
        for (int i = 0; i < COLS; ++i) {
            Object obj = row.get(i + 1, m_types[i]);
            assertTrue(comparisonHelper(obj, params[i + 2], m_types[i]));
        }
    }
View Full Code Here

            fail();
        }

        VoltTable[] result = client.callProcedure("Select",
                "WITH_NULL_DEFAULTS", pkey.get()).getResults();
        VoltTableRow row = result[0].fetchRow(0);
        for (int i = 0; i < COLS; ++i) {
            Object obj = row.get(i + 1, m_types[i]);
            assertTrue(comparisonHelper(obj, params[i + 2], m_types[i]));
        }
    }
View Full Code Here

            params[0] = "NO_NULLS";
            client.callProcedure("Insert", params);
            // verify that the row was updated
            final VoltTable[] result = client.callProcedure("Select",
                    "NO_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i = 0; i < COLS; ++i) {
                final Object obj = row.get(i + 1, m_types[i]);
                assertTrue(!row.wasNull());
                assertTrue(comparisonHelper(obj, params[i + 2], m_types[i]));
            }
        }
    }
View Full Code Here

                    + m_types[k]);
            params[0] = "NO_NULLS";
            client.callProcedure("Insert", params);
            final VoltTable[] result = client.callProcedure("Select",
                    "NO_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i = 0; i < COLS; ++i) {
                final Object obj = row.get(i + 1, m_types[i]);
                assertTrue(!row.wasNull());
                assertTrue(comparisonHelper(obj, params[i + 2], m_types[i]));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.voltdb.VoltTableRow

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.