public function visitUnaryOperation(O\UnaryOperationExpression $expression) { $this->walk($expression->getOperand()); $this->addTypeOperation($expression, $this->analysis[$expression->getOperand()]->getUnaryOperation($expression)); }
protected function visitUnaryOperation(UnaryOperationExpression $expression) { $operator = $expression->getOperator(); if (!isset($this->unaryOperators[$operator])) { throw new PinqDemoSqlException("Unary operator not supported: {$operator}"); } $this->sql .= '('; $this->sql .= $this->unaryOperators[$operator]; $this->walk($expression->getOperand()); $this->sql .= ')'; }