Package org.voltdb

Examples of org.voltdb.VoltTable.fetchRow()


       
        voltQueueSQL(getInfo5, symbol);
        VoltTable last_trade = voltExecuteSQL()[0];
       
        assert last_trade.getRowCount() == 1;
        long last_vol = last_trade.fetchRow(0).getLong("LT_VOL");
       
        if (access_lob_flag == 1) {
            voltQueueSQL(getInfo6, co_id);
        }
        else {
View Full Code Here


       
        double old_mkt_cap = 0.0, new_mkt_cap = 0.0;
        Set<String> watch_symbols = new HashSet<String>(); // for 'distinct' if symbols are from watch lists
       
        for (int i = 0; i < stock_list.getRowCount(); i++) {
            String symbol = stock_list.fetchRow(i).getString(0);
           
            // if we had gotten symbols through watch lists, we have to do manual 'distinct'
            if (cust_id != 0) {
                if (watch_symbols.contains(symbol)) {
                    continue;
View Full Code Here

           
            voltQueueSQL(getNewPrice, symbol);
            VoltTable vt = voltExecuteSQL()[0];
           
            assert vt.getRowCount() == 1;
            double new_price = vt.fetchRow(0).getDouble("LT_PRICE");

            voltQueueSQL(getNumOut, symbol);
            vt = voltExecuteSQL()[0];
           
            assert vt.getRowCount() == 1;
View Full Code Here

            voltQueueSQL(getNumOut, symbol);
            vt = voltExecuteSQL()[0];
           
            assert vt.getRowCount() == 1;
            long s_num_out = vt.fetchRow(0).getLong("S_NUM_OUT");
           

            voltQueueSQL(getOldPrice, symbol);
            vt = voltExecuteSQL()[0];
           
View Full Code Here

            voltQueueSQL(getOldPrice, symbol);
            vt = voltExecuteSQL()[0];
           
            assert vt.getRowCount() == 1;
            double old_price = vt.fetchRow(0).getDouble("DM_CLOSE");

            old_mkt_cap += s_num_out * old_price;
            new_mkt_cap += s_num_out * new_price;
        }
       
View Full Code Here

           
            VoltTable trades = voltExecuteSQL()[0];
           
            result = trade_lookup_ret_template_frame23.clone(256);
            for (int i = 0; i < trades.getRowCount(); i++) {
                VoltTableRow trade_row = trades.fetchRow(i);
               
                long trade_id = trade_row.getLong("T_ID");
                int is_cash = (int)trade_row.getLong("T_IS_CASH");
               
                voltQueueSQL(getSettlement, trade_id);
View Full Code Here

           
            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

        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

       
        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

         */
        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

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.