2009-03-17 01:12:38 +03:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* To change this template, choose Tools | Templates
|
|
|
|
* and open the template in the editor.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Doctrine\ORM\Query\AST;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"
|
|
|
|
*
|
|
|
|
* @author robo
|
|
|
|
*/
|
|
|
|
class ExistsExpression extends Node
|
|
|
|
{
|
|
|
|
private $_not = false;
|
|
|
|
private $_subselect;
|
|
|
|
|
|
|
|
public function __construct($subselect)
|
|
|
|
{
|
|
|
|
$this->_subselect = $subselect;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setNot($bool)
|
|
|
|
{
|
|
|
|
$this->_not = $bool;
|
|
|
|
}
|
|
|
|
|
2009-03-23 20:39:33 +03:00
|
|
|
public function isNot()
|
2009-03-17 01:12:38 +03:00
|
|
|
{
|
|
|
|
return $this->_not;
|
|
|
|
}
|
2009-03-23 20:39:33 +03:00
|
|
|
|
|
|
|
public function getSubselect()
|
|
|
|
{
|
|
|
|
return $this->_subselect;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function dispatch($sqlWalker)
|
|
|
|
{
|
|
|
|
return $sqlWalker->walkExistsExpression($this);
|
|
|
|
}
|
2009-03-17 01:12:38 +03:00
|
|
|
}
|
|
|
|
|