Examples of fetchRow()


Examples of org.voltdb.VoltTable.fetchRow()

        assert cust.getRowCount() == 1;
       
        VoltTableRow sec_row = sec.fetchRow(0);
        String s_ex_id = sec_row.getString("S_EX_ID");
        String s_name = sec_row.getString("S_NAME");
        int c_tier = (int)cust.fetchRow(0).getLong("C_TIER");
       
        voltQueueSQL(getCommissionRate, c_tier, type_id, s_ex_id, trade_qty, trade_qty); // limit to 1 row
        VoltTable comm = voltExecuteSQL()[0];
       
        assert comm.getRowCount() == 1;
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

       
        voltQueueSQL(getCommissionRate, c_tier, type_id, s_ex_id, trade_qty, trade_qty); // limit to 1 row
        VoltTable comm = voltExecuteSQL()[0];
       
        assert comm.getRowCount() == 1;
        double comm_rate = comm.fetchRow(0).getDouble("CR_RATE");
       
        // frame 5: recording the results
        double comm_amount = (comm_rate / 100) * (trade_qty * trade_price);
       
        voltQueueSQL(updateTrade2, comm_amount, trade_dts, st_completed_id, trade_price, trade_id);
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

       
        voltQueueSQL(getCustomerAccountBalance, acct_id);
        VoltTable bal = voltExecuteSQL()[0];
       
        assert bal.getRowCount() == 1;
        double acct_bal = bal.fetchRow(0).getDouble("CA_BAL");
       
        VoltTable ret_values = trade_result_ret_template.clone(64);
        ret_values.addRow(acct_bal);
       
        return new VoltTable[] {ret_values};
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

    public VoltTable[] run(long max_rows_to_return, long access_lob_flag, TimestampType start_day, String symbol) throws VoltAbortException {
        voltQueueSQL(getInfo1, symbol);
        VoltTable sec_detail = voltExecuteSQL()[0];
       
        assert sec_detail.getRowCount() == 1;
        long co_id = sec_detail.fetchRow(0).getLong("CO_ID"); // only co_id is really required
       
        voltQueueSQL(getInfo2, co_id);
        voltQueueSQL(getInfo3, co_id);
        voltQueueSQL(getInfo4, symbol, start_day);
        voltExecuteSQL(); // do not really need the results
View Full Code Here

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

Examples of org.voltdb.VoltTable.fetchRow()

       
        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

Examples of org.voltdb.VoltTable.fetchRow()

           
            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

Examples of org.voltdb.VoltTable.fetchRow()

            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

Examples of org.voltdb.VoltTable.fetchRow()

            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

Examples of org.voltdb.VoltTable.fetchRow()

           
            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
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.