Examples of fetchRow()


Examples of org.voltdb.VoltTable.fetchRow()

           
            result = trade_lookup_ret_template_frame4.clone(128);
           
            // there might be a case of no trades
            if (trades.getRowCount() > 0) {
                long trade_id = trades.fetchRow(0).getLong("T_ID");
                result.addRow(trade_id);
               
                voltQueueSQL(getHoldingHistory, trade_id);
                voltExecuteSQL(); // the client does not need the results
            }
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

        if (cust_id == 0) {
            voltQueueSQL(getCID, tax_id);
            VoltTable cust = voltExecuteSQL()[0];
           
            assert cust.getRowCount() == 1;
            cust_id = cust.fetchRow(0).getLong("C_ID");
        }
       
        voltQueueSQL(getCustomer, cust_id);
        VoltTable cust = voltExecuteSQL()[0];
       
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

       
        voltQueueSQL(getCustomer, cust_id);
        VoltTable cust = voltExecuteSQL()[0];
       
        assert cust.getRowCount() == 1;
        VoltTableRow customer = cust.fetchRow(0);
       
        voltQueueSQL(getAssets, cust_id);
        VoltTable assets = voltExecuteSQL()[0];
       
        /*
 
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

         */
        Map<Long, Double> cust_bal = new HashMap<Long, Double>();
        Map<Long, Double> cust_holds = new HashMap<Long, Double>();
       
        for (int i = 0; i < assets.getRowCount(); i++) {
            VoltTableRow asset  = assets.fetchRow(i);
           
            long acct_id = asset.getLong("CA_ID");
            double cash_bal = asset.getDouble("CA_BAL");
            double hold_asset = asset.getDouble(2);
           
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

            voltQueueSQL(getTrades, acct_id);
            VoltTable trades = voltExecuteSQL()[0];
           
            // since we split the original SQL statement we have to retrieve every trade separately
            for (int i = 0; i < trades.getRowCount(); i++) {
                long trade_id = trades.fetchRow(i).getLong("T_ID");
                voltQueueSQL(getTradeHistory, trade_id);
            }
           
            // we cannot limit them by 30 as required, so we will retrieve the whole history
            voltExecuteSQL();
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

                    // no "AA", "ZAPS", "ZONS" list
                    voltQueueSQL(selectWatchListMax);
                    VoltTable wl = voltExecuteSQL()[0];
                   
                    assert wl.getRowCount() == 1;
                    long last_wl_id = wl.fetchRow(0).getLong(0);
                   
                    voltQueueSQL(insertWatchList, last_wl_id + 1, c_id);
                    voltQueueSQL(insertWatchItem, last_wl_id + 1, symbol1);
                    voltQueueSQL(insertWatchItem, last_wl_id + 1, symbol2);
                    voltQueueSQL(insertWatchItem, last_wl_id + 1, symbol3);
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

                    // the customer has the list -- remove it for this and all other customers
                    voltQueueSQL(selectMaxCommonWatchList, symbol1, symbol2, symbol3);
                    VoltTable wl = voltExecuteSQL()[0];
                   
                    assert wl.getRowCount() == 1;
                    long max_wl_id = wl.fetchRow(0).getLong(0);
                   
                    // have to remove all lists with ids greater that that one
                    voltQueueSQL(deleteWatchListItems, max_wl_id);
                    voltQueueSQL(deleteWatchList, max_wl_id);
                }
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

                // no watch lists for the customer -- insert this as the only one
                voltQueueSQL(selectWatchListMax);
                VoltTable wl = voltExecuteSQL()[0];
               
                assert wl.getRowCount() == 1;
                long last_wl_id = wl.fetchRow(0).getLong(0);
               
                voltQueueSQL(insertWatchList, last_wl_id + 1, c_id);
                voltQueueSQL(insertWatchItem, last_wl_id + 1, symbol1);
                voltQueueSQL(insertWatchItem, last_wl_id + 1, symbol2);
                voltQueueSQL(insertWatchItem, last_wl_id + 1, symbol3);
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

            VoltTable brok_res = voltExecuteSQL()[0];
           
            if (brok_res.getRowCount() > 0) {
                double vol = 0;
                for (int j = 0; j < brok_res.getRowCount(); j++) {
                    vol += brok_res.fetchRow(j).getDouble(1);
                }
                volumes.add(vol);
            }
        }
       
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

            try {
                LOG.info("Processing " + num_tuples + " (sample=10) tuples for statistics on " + catalog_tbl.getName());
                boolean show_progress = (num_tuples > 25000);
                for (int i = 0; i < num_tuples; i += 10) {
                    if (i >= num_tuples) break;
                    VoltTableRow tuple = voltTable.fetchRow(i);
                    for (int j = 0; j < num_columns; j++) {
                        loader_query.params[j] = tuple.get(j, col_types[j]);
                    } // FOR
                    table_stats.process(stats_catalog_db, loader_xact);
                    if (show_progress && i > 0 && i % 10000 == 0) LOG.info(i + " tuples");
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.