super.setup();
{
queryService.execute(new CqlQuery(CqlQueryType.DELETE,
"delete from CqlDemo.MyBooks where id=44a2054c-f98b-43a7-833d-0e1358fdaa82"));
CqlQueryResult res = queryService.execute(new CqlQuery(CqlQueryType.SELECT,
"select impcol from CqlDemo.MyBooks where id=44a2054c-f98b-43a7-833d-0e1358fdaa82"));
assertFalse(res.toString(), res.iterator().hasNext());
}
{
CqlQueryResult res = queryService.execute(new CqlQuery(CqlQueryType.SELECT,
"select cval from CqlDemo.MyCounter where id=44a2054c-f98b-43a7-833d-0e1358fdaa82"));
if (!res.isEmpty()) {
long foundCounterVal = res.iterator().next().getLong("cval");
queryService.execute(new CqlQuery(CqlQueryType.UPDATE, "UPDATE CqlDemo.MyCounter SET cval=cval-"
+ foundCounterVal + " WHERE id=44a2054c-f98b-43a7-833d-0e1358fdaa82"));
}
}