code: public Result next() {
          if (query == null) { throw new IllegalStateException("_query variable is null"); }
  
          synchronized (getDatabase().getLock()) {
              try {
                  if (c4enum == null) { return null; }
                  else if (isAllEnumerated) {
                      Log.w(DOMAIN, "All query results have already been enumerated.");
                      return null;
                  }
                  else if (!c4enum.next()) {
                      Log.i(DOMAIN, "End of query enumeration");
                      isAllEnumerated = true;
                      return null;
                  }
                  else { return currentObject(); }
              }
              catch (LiteCoreException e) {
                  Log.w(DOMAIN, "Query enumeration error: %s", e.toString());
                  return null;
              }
          }
      }
docs: Move the cursor forward one row from its current row position.
  Caution: next() method and iterator() method share same data structure.
  Please don't use them together.
  Caution: In case ResultSet is obtained from QueryChangeListener, and QueryChangeListener is
  already removed from Query, ResultSet is already freed. And this next() method returns null.
  
  @return the Result after moving the cursor forward. Returns {@code null} value
  if there are no more rows, or ResultSet is freed already.