src/WorkerF/DB/Drivers/PDODriver.php
public function whereExists(Closure $callback, $condition = 'EXISTS', $operator = 'AND')
    {
        if ( ! in_array($condition, ['EXISTS', 'NOT EXISTS']) || ! in_array($operator, ['AND', 'OR'])) {
            throw new \InvalidArgumentException("Error whereExists mode");
        }
        // first time call where ?
        if ($this->_where_str == '') {
            $this->_where_str = ' WHERE '.$condition.' ( ';
        } else {
            $this->_where_str .= ' '.$operator.' '.$condition.' ( ';
        }

        $sub_attr = $this->_subBuilder($callback);
        $this->_where_str .= $sub_attr['_prepare_sql'].' ) ';

        return $this;
    }
public function whereExists(Closure $callback, $condition = 'EXISTS', $operator = 'AND')
    {
        if ( ! in_array($condition, ['EXISTS', 'NOT EXISTS']) || ! in_array($operator, ['AND', 'OR'])) {
            throw new \InvalidArgumentException("Error whereExists mode");
        }
        // first time call where ?
        if ($this->_where_str == '') {
            $this->_where_str = ' WHERE '.$condition.' ( ';
        } else {
            $this->_where_str .= ' '.$operator.' '.$condition.' ( ';
        }

        $sub_attr = $this->_subBuilder($callback);
        $this->_where_str .= $sub_attr['_prepare_sql'].' ) ';

        return $this;
    }
build whereExists string

@param  \Closure $callback
@param  string $condition
@param  string $operator
@return  self
@throws  \InvalidArgumentException