incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhijit Chanda <abhijit.chan...@gmail.com>
Subject Fluent Cassandra index query
Date Thu, 31 May 2012 11:37:51 GMT
Hi All,

I am looking for the equivalent set of lines in fluent Cassandra. These
lines are written in Astyanax API.

       // Here parameterList contains a List of values to be retreived
       // cf_events is the columnfamily
       OperationResult<Rows<String,String>> result  =
keyspace.prepareQuery(cf_events)
                    .searchWithIndex()

.addExpression().whereColumn(xDR.A_NO).equals().value(mob1)

.addExpression().whereColumn(xDR.B_NO).equals().value(mob2)
                    .withColumnSlice(parameterList).execute();
        for(Row<String,String> row : result.getResult()){
                ColumnList<String> columnList = row.getColumns();
                for(int i=0;i<parameterList.size();i++){

list.add(columnList.getColumnByName(parameterList.get(i)).getStringValue());
                }
        }

Thanks in Advance,
-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-9748888395

Mime
View raw message