Package org.voltdb

Examples of org.voltdb.VoltTable.fetchRow()


        long prevBidTime = -1;

        // make sure that we get a row before reading this info
        if (highBidResult.getRowCount() == 1) {
            prevBidderID = highBidResult.fetchRow(0).getLong("BIDDERID");
            prevBidPrice = highBidResult.fetchRow(0).getDouble("BIDPRICE");
            prevBidTime = highBidResult.fetchRow(0).getTimestampAsLong("BIDTIME");
        }

        // get the current seller id
        voltQueueSQL(getSellerID, itemId);
View Full Code Here


        // make sure that we get a row before reading this info
        if (highBidResult.getRowCount() == 1) {
            prevBidderID = highBidResult.fetchRow(0).getLong("BIDDERID");
            prevBidPrice = highBidResult.fetchRow(0).getDouble("BIDPRICE");
            prevBidTime = highBidResult.fetchRow(0).getTimestampAsLong("BIDTIME");
        }

        // get the current seller id
        voltQueueSQL(getSellerID, itemId);
        VoltTable getSellerResult = voltExecuteSQL()[0];
View Full Code Here

        }

        // get the current seller id
        voltQueueSQL(getSellerID, itemId);
        VoltTable getSellerResult = voltExecuteSQL()[0];
        long currentSellerID = getSellerResult.fetchRow(0).getLong("SELLERID");

        // get the end time for this auction
        voltQueueSQL(getEndTime, itemId);
        VoltTable getEndTimeResult = voltExecuteSQL()[0];
        long endTime = getEndTimeResult.fetchRow(0).getTimestampAsLong("ENDTIME");
View Full Code Here

        long currentSellerID = getSellerResult.fetchRow(0).getLong("SELLERID");

        // get the end time for this auction
        voltQueueSQL(getEndTime, itemId);
        VoltTable getEndTimeResult = voltExecuteSQL()[0];
        long endTime = getEndTimeResult.fetchRow(0).getTimestampAsLong("ENDTIME");
        TimestampType currentTime = new TimestampType();

        // zero represents a successful bid
        long bidTest = SUCCESSFULL_BID;
        // we can't bid if we're the seller
View Full Code Here

        );

        // get the seller id and item name from ITEM table
        voltQueueSQL(getItemInfo, itemId);
        VoltTable itemTable = voltExecuteSQL()[0];
        VoltTableRow itemRow = itemTable.fetchRow(0);
        // resulting info:
        long sellerId = itemRow.getLong("SELLERID");
        String itemName = itemRow.getString("ITEMNAME");
        long endTime = itemRow.getTimestampAsLong("ENDTIME");
       
View Full Code Here

        long highBidId = itemRow.getLong("HIGHBIDID");

        // get high bid info
        voltQueueSQL(getBidInfo, highBidId);
        VoltTable statusTable = voltExecuteSQL()[0];
        VoltTableRow row = statusTable.fetchRow(0);
        // resulting info:
        long bidderId = row.getLong("BIDDERID");
        double bidPrice = row.getDouble("BIDPRICE");

        // count the number of bids on the auction
View Full Code Here

        double bidPrice = row.getDouble("BIDPRICE");

        // count the number of bids on the auction
        voltQueueSQL(getBidCount, itemId);
        VoltTable bidCountTable = voltExecuteSQL()[0];
        VoltTableRow bidCountRow = bidCountTable.fetchRow(0);
        // resulting info:
        // the minus one is for the fake initial bid
        long bidCount = bidCountRow.getLong(0) - 1;

        // get the names of the bidder and seller
View Full Code Here

        if (rowCount != 1) {
            throw new VoltAbortException(getClass().getName() +
                    " invalid row count " + rowCount + " for count query" +
                    " on dimension table for cid " + cid);
        }
        VoltTableRow row = dim.fetchRow(0);
        long c = row.getLong(0);
        switch ((int)c) {
        case 0:
            voltQueueSQL(d_Insert, cid, cid);
            results = voltExecuteSQL(true);
View Full Code Here

        long prevtxnid = 0;
        long prevrid = 0;
        long cnt = 0;

        // read data modified by AdHocMayhemThread for later insertion
        final long adhocInc = adhoc.getRowCount() > 0 ? adhoc.fetchRow(0).getLong("inc") : 0;
        final long adhocJmp = adhoc.getRowCount() > 0 ? adhoc.fetchRow(0).getLong("jmp") : 0;

        // compute the cheesy checksum of all of the table's contents based on
        // this cid to subsequently store in the new row
        final long cidallhash = MiscUtils.cheesyBufferCheckSum(data.getBuffer());
View Full Code Here

        long prevrid = 0;
        long cnt = 0;

        // read data modified by AdHocMayhemThread for later insertion
        final long adhocInc = adhoc.getRowCount() > 0 ? adhoc.fetchRow(0).getLong("inc") : 0;
        final long adhocJmp = adhoc.getRowCount() > 0 ? adhoc.fetchRow(0).getLong("jmp") : 0;

        // compute the cheesy checksum of all of the table's contents based on
        // this cid to subsequently store in the new row
        final long cidallhash = MiscUtils.cheesyBufferCheckSum(data.getBuffer());
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.