RETRIEVING MULTIPLE COLUMNS WITH SLICERANGE
To retrieve the three columns inserted in the previous example in a single query, use HFactory to construct a SliceQuery for those columns:
// given Keyspace ko and StringSerializer se
SliceQuery q = HFactory.createSliceQuery(ko, se, se, se);
q.setColumnFamily(cf)
.setKey("jsmith")
.setColumnNames("first", "last", "middle");
Result<columnslice<string, string="">> r = q.execute();
To retrieve the three columns inserted in the previous example in a single query, use HFactory to construct a SliceQuery for those columns:
// given Keyspace ko and StringSerializer se
SliceQuery
q.setColumnFamily(cf)
.setKey("jsmith")
.setColumnNames("first", "last", "middle");
Result<columnslice<string, string="">> r = q.execute();
No comments:
Post a Comment