code: func (r *Rego) PartialResult(ctx context.Context) (PartialResult, error) {
  	var err error
  	if r.txn == nil {
  		r.txn, err = r.store.NewTransaction(ctx)
  		if err != nil {
  			return PartialResult{}, err
  		}
  		defer r.store.Abort(ctx, r.txn)
  	}
  
  	pq, err := r.PrepareForEval(ctx, WithPartialEval())
  	if err != nil {
  		return PartialResult{}, err
  	}
  
  	pr := PartialResult{
  		compiler: pq.r.compiler,
  		store:    pq.r.store,
  		body:     pq.r.parsedQuery,
  	}
  
  	return pr, nil
  }
docs: // PartialResult partially evaluates this Rego object and returns a PartialResult.