code: func (itr *resultsItr) Next() (commonledger.QueryResult, error) {
  	queryResult, err := itr.dbItr.Next()
  	if err != nil {
  		return nil, err
  	}
  	itr.updateRangeQueryInfo(queryResult)
  	if queryResult == nil {
  		return nil, nil
  	}
  	versionedKV := queryResult.(*statedb.VersionedKV)
  	return &queryresult.KV{Namespace: versionedKV.Namespace, Key: versionedKV.Key, Value: versionedKV.Value}, nil
  }
docs: // Next implements method in interface ledger.ResultsIterator
  // Before returning the next result, update the EndKey and ItrExhausted in rangeQueryInfo
  // If we set the EndKey in the constructor (as we do for the StartKey) to what is
  // supplied in the original query, we may be capturing the unnecessary longer range if the
  // caller decides to stop iterating at some intermediate point. Alternatively, we could have
  // set the EndKey and ItrExhausted in the Close() function but it may not be desirable to change
  // transactional behaviour based on whether the Close() was invoked or not