// delete all rows in a given scan
int count = 0;
int stat;
final boolean allowFetch = true; // request new batches when exhausted
final boolean forceSend = false; // send may be delayed
while ((stat = op.nextResult(allowFetch, forceSend)) == 0) {
// delete all tuples within a batch
do {
if (op.deleteCurrentTuple() != 0)
throw new RuntimeException(toStr(tx.getNdbError()));
count++;