src/QueryBricks/WhereTrait.php
public function whereExists($subQuery, bool $not = false, string $appendRule = 'AND'): self
    {
        $subQuery = $this->checkSubQueryValue('Argument $subQuery', $subQuery);

        $this->where[] = new ExistsCriterion($subQuery, $not, $appendRule);
        return $this;
    }
public function whereExists($subQuery, bool $not = false, string $appendRule = 'AND'): self
    {
        $subQuery = $this->checkSubQueryValue('Argument $subQuery', $subQuery);

        $this->where[] = new ExistsCriterion($subQuery, $not, $appendRule);
        return $this;
    }
public function whereExists ( $ subQuery , bool $ not = false , string $ appendRule = 'AND' ) : self { $ subQuery = $ this -> checkSubQueryValue ( 'Argument $subQuery' , $ subQuery ) ; $ this -> where [ ] = new ExistsCriterion ( $ subQuery , $ not , $ appendRule ) ; return $ this ; }
Adds a EXISTS criterion to the WHERE section.

@param $subQuery \Closure|Query|StatementInterface Query to place inside the EXISTS clause. If closure, it
should create the query.
@param bool $not Whether the rule should be NOT EXISTS
@param string $appendRule How the criterion should be appended to the others (SQL boolean operator name)
@return $this
@throws InvalidArgumentException
@throws InvalidReturnValueException
Adds a EXISTS criterion to the WHERE section .