code: func (itr *queryResultsItr) Next() (commonledger.QueryResult, error) {
  
  	queryResult, err := itr.DBItr.Next()
  	if err != nil {
  		return nil, err
  	}
  	if queryResult == nil {
  		return nil, nil
  	}
  	versionedQueryRecord := queryResult.(*statedb.VersionedKV)
  	logger.Debugf("queryResultsItr.Next() returned a record:%s", string(versionedQueryRecord.Value))
  
  	if itr.RWSetBuilder != nil {
  		itr.RWSetBuilder.AddToReadSet(versionedQueryRecord.Namespace, versionedQueryRecord.Key, versionedQueryRecord.Version)
  	}
  	return &queryresult.KV{Namespace: versionedQueryRecord.Namespace, Key: versionedQueryRecord.Key, Value: versionedQueryRecord.Value}, nil
  }
docs: // Next implements method in interface ledger.ResultsIterator