Author: Elliot Levin (elliotlevin@hotmail.com)
Inheritance: extends Pinq\Providers\DSL\Compilation\Processors\ScopeProcessor, implements Pinq\Queries\Segments\ISegmentVisitor
 public function visitOrderBy(Segments\OrderBy $segment)
 {
     foreach ($segment->getOrderings() as $ordering) {
         $this->parameters->addId($ordering->getIsAscendingId(), ParameterHasher::valueType());
     }
     return parent::visitOrderBy($segment);
 }
 public function visitOrderBy(Segments\OrderBy $segment)
 {
     $staticOrderings = [];
     foreach ($segment->getOrderings() as $key => $ordering) {
         $staticOrderings[$key] = new StaticOrdering($ordering->getProjectionFunction(), $this->parameters->getResolvedParameters()[$ordering->getIsAscendingId()]);
     }
     return parent::visitOrderBy($segment->update($staticOrderings));
 }
 public function visitRange(Segments\Range $segment)
 {
     $this->parameters->addId($segment->getStartId(), ParameterHasher::valueType());
     $this->parameters->addId($segment->getAmountId(), ParameterHasher::valueType());
     return parent::visitRange($segment);
 }
示例#4
0
 public function visitJoin(Segments\Join $segment)
 {
     return parent::visitJoin($segment->update($this->updateJoinOptions($segment->getOptions()), $this->expressionProcessor->processFunction($segment->getJoiningFunction())));
 }
 public function visitRange(Segments\Range $segment)
 {
     return parent::visitRange(new StaticRange($this->parameters->getResolvedParameters()[$segment->getStartId()], $this->parameters->getResolvedParameters()[$segment->getAmountId()]));
 }