Examples of fetchRow()


Examples of org.voltdb.VoltTable.fetchRow()

        } catch (Exception e) {
            e.printStackTrace();
        }

        final int index = (namecnt-1)/2;
        final VoltTableRow customer = customers.fetchRow(index);
        final long c_id = customer.getLong(C_ID_IDX);

        voltQueueSQL(getWarehouse, W_ID);
        voltQueueSQL(getDistrict, W_ID, D_ID);
        final VoltTable[] results = voltExecuteSQL();
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

        assert(amt1 == amt2);

        voltQueueSQL(getDistricts);
        VoltTable districts = voltExecuteSQL()[0];
        assert(1 == districts.getRowCount());
        assert((initialYTD + paymentAmount) == districts.fetchRow(0).getDouble("D_YTD"));

        voltQueueSQL(getCustomers);
        VoltTable customersX = voltExecuteSQL()[0];
        assert(4 == customersX.getRowCount());
        assert((C_ID + 1) == customersX.fetchRow(1).getLong("C_ID"));
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

        assert((initialYTD + paymentAmount) == districts.fetchRow(0).getDouble("D_YTD"));

        voltQueueSQL(getCustomers);
        VoltTable customersX = voltExecuteSQL()[0];
        assert(4 == customersX.getRowCount());
        assert((C_ID + 1) == customersX.fetchRow(1).getLong("C_ID"));
        assert((initialBalance - paymentAmount) == customersX.fetchRow(1).getDouble("C_BALANCE"));
        assert((initialYTD + paymentAmount) == customersX.fetchRow(1).getDouble("C_YTD_PAYMENT"));
        assert(2 == customersX.fetchRow(1).getLong("C_PAYMENT_CNT"));

        return null;
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

        voltQueueSQL(getCustomers);
        VoltTable customersX = voltExecuteSQL()[0];
        assert(4 == customersX.getRowCount());
        assert((C_ID + 1) == customersX.fetchRow(1).getLong("C_ID"));
        assert((initialBalance - paymentAmount) == customersX.fetchRow(1).getDouble("C_BALANCE"));
        assert((initialYTD + paymentAmount) == customersX.fetchRow(1).getDouble("C_YTD_PAYMENT"));
        assert(2 == customersX.fetchRow(1).getLong("C_PAYMENT_CNT"));

        return null;
    }
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

        voltQueueSQL(getCustomers);
        VoltTable customersX = voltExecuteSQL()[0];
        assert(4 == customersX.getRowCount());
        assert((C_ID + 1) == customersX.fetchRow(1).getLong("C_ID"));
        assert((initialBalance - paymentAmount) == customersX.fetchRow(1).getDouble("C_BALANCE"));
        assert((initialYTD + paymentAmount) == customersX.fetchRow(1).getDouble("C_YTD_PAYMENT"));
        assert(2 == customersX.fetchRow(1).getLong("C_PAYMENT_CNT"));

        return null;
    }
}
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

        VoltTable customersX = voltExecuteSQL()[0];
        assert(4 == customersX.getRowCount());
        assert((C_ID + 1) == customersX.fetchRow(1).getLong("C_ID"));
        assert((initialBalance - paymentAmount) == customersX.fetchRow(1).getDouble("C_BALANCE"));
        assert((initialYTD + paymentAmount) == customersX.fetchRow(1).getDouble("C_YTD_PAYMENT"));
        assert(2 == customersX.fetchRow(1).getLong("C_PAYMENT_CNT"));

        return null;
    }
}
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

            map.put(key, new Object[row_count]);

        // for update, delete, insert, keys is empty
        if (keys.length > 0) {
            for (int i = 0; i < row_count; i++) {
                VoltTableRow row = table.fetchRow(i);
                for (int j = 0; j < keys.length; j++) {
                    Object[] vals = map.get(keys[j]);
                    Object ref = value_refs[j];
                    if (ref instanceof Integer) {
                        // ref is column_index
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

        VoltTable vt = new VoltTable(new ColumnInfo[] {
            new ColumnInfo(catalog_col0.getName(), VoltType.get(catalog_col0.getType())),   // D_ID
            new ColumnInfo(catalog_col1.getName(), VoltType.get(catalog_col1.getType())),   // D_W_ID
        });
        vt.addRow(params[0], params[1]);
        VoltTableRow vt_row = vt.fetchRow(0);
        int vt_partition = p_estimator.getTableRowPartition(catalog_tbl, vt_row);
        assert(vt_partition >= 0) : "Invalid Partition: " + vt_partition;
        assertEquals(stmt_partition, vt_partition);
    }
   
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

           
            result = trade_update_ret_template_frame2.clone(256);
            int num_updated = 0;
           
            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");
               
                if (num_updated < max_updates) {
View Full Code Here

Examples of org.voltdb.VoltTable.fetchRow()

                if (num_updated < max_updates) {
                    voltQueueSQL(getCashType, trade_id);
                    VoltTable cash = voltExecuteSQL()[0];
                   
                    assert cash.getRowCount() == 1;
                    String cash_type = cash.fetchRow(0).getString("SE_CASH_TYPE");
                   
                    if (is_cash == 1) {
                        if (cash_type.equals("Cash Account")) {
                            cash_type = "Cash";
                        }
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.