Pagekit\Database\Query\QueryBuilder::having PHP Method

having() public method

Creates and adds a "having" to the query.
public having ( mixed $having, string $type = CompositeExpression::TYPE_AND ) : self
$having mixed
$type string
return self
    public function having($having, $type = CompositeExpression::TYPE_AND)
    {
        $args = func_get_args();
        $having = $this->getPart('having');
        if ($having instanceof CompositeExpression && $having->getType() === $type) {
            $having->addMultiple($args);
        } else {
            array_unshift($args, $having);
            $having = new CompositeExpression($type, $args);
        }
        return $this->setPart('having', $having);
    }