@Override
  public boolean hasNext() {

    try {
      return result.hasNext();

    } catch (TransientException tex) {
      db.getCurrentTransaction().setClosed(true);
      throw new RetryException(tex);
    }
  }
  @Override
  public Iterator columnAs(final String name) {

    final Iterator<Value> it = result.list(Records.column(name)).iterator();

    return Iterables.map(
        new Function<Value, Object>() {

          @Override
          public Object apply(final Value t) {
            return wrapper.apply(t.asObject());
          }
        },
        it);
  }
 @Override
 public Map next() {
   return new MapResultWrapper(db, result.next().asMap());
 }