@param string|ToSqlInterface $having

@return $this
433711
public function having($having)
    {
        if (false == ($having instanceof Q)) {
            $having = new QAnd($having);
        }
        $having->setLookupBuilder($this->getLookupBuilder());
        $having->setAdapter($this->getAdapter());

        $this->sqlParts['having'] = $having;

        return $this;
    }
68898
public function having($column, $operator = null, $value = null): BaseQueryRelateContract
    {
        $this->query->having($column, $operator, $value, 'and');

        return $this;
    }
967940
public function applyAggregate(DataQuery $query, $having)
    {
        $schema = DataObject::getSchema();
        $baseTable = $schema->baseDataTable($query->dataClass());

        return $query
            ->having($having)
            ->groupby("\"{$baseTable}\".\"ID\"");
    }
660917
public function having($field, $condition = false, $operator = '=')
    {
        if (func_num_args() >= 2) {
            $this->having->addCondition($field, $condition, $operator);
        } else {
            $this->having->addCondition($field);
        }

        return $this;
    }
423197
public function orHaving($having)
    {
        $args   = func_get_args();
        $having = $this->getQueryPart('having');

        if ($having instanceof CompositeExpression && $having->getType() === CompositeExpression::TYPE_OR) {
            $having->addMultiple($args);
        } else {
            array_unshift($args, $having);
            $having = new CompositeExpression(CompositeExpression::TYPE_OR, $args);
        }

        return $this->add('having', $having);
    }
256928
public final Having havingClause() throws RecognitionException {
		Having having = null;


		Having h =null;

		try {
			// druidG.g:368:2: (h= complexHaving )
			// druidG.g:368:4: h= complexHaving
			{
			pushFollow(FOLLOW_complexHaving_in_havingClause2584);
			h=complexHaving();
			state._fsp--;

			having = h;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return having;
	}
1149845
public function addHaving($having)
    {
        $having = $this->normalisePredicates(func_get_args());

        // If the function is called with an array of items
        $this->having = array_merge($this->having, $having);

        return $this;
    }
753064
@NonNull
    @Override
    public Having having(@NonNull Expression expression) {
        if (expression == null) {
            throw new IllegalArgumentException("expression cannot be null.");
        }
        return new Having(this, expression);
    }
87009
protected function havingCondictions(array $havings): string
	{
		$conditions = [];

		$conditionCounter = 0;

		foreach($havings as $having)
		{
			$conditions[] = ($conditionCounter > 0 ? $having['separator'] . ' ' : null) . $this->column($having['column']) . ' ' . $having['operator'] . ' ' . $this->param($having['value']);

			$conditionCounter++;
		}

		return implode(' ', $conditions);
	}
656343
public final void mHAVING() throws RecognitionException {
		try {
			int _type = HAVING;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:32:8: ( 'having' )
			// hql.g:32:10: 'having'
			{
			match("having"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
641629
public function having($query)
    {
        $clause = '';

        if (!empty($query->having)) {
            $clause = ' HAVING '.implode(' , ', $query->having);
        }

        return $clause;
    }
880609
public function having($condition, $tablePlaceholder = ':TBL:') {
        $this->having = trim(str_replace($tablePlaceholder, $this->name,
                        $condition));
        return $this;
    }
600311
public function having($field, $cond = UNDEFINED, $value = UNDEFINED)
    {
        return $this->where($field, $cond, $value, 'having');
    }
189611
public function having($having)
    {
        if (! (func_num_args() === 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) {
            $having = new Expr\Andx(func_get_args());
        }

        return $this->add('having', $having);
    }
410591
public function having(string $sql, array $params = []) : self
    {
        $this->qiterator = null;
        $this->having[] = [ $sql, $params ];
        return $this;
    }
1299271
public function having($having, $bind = [])
    {
        if (is_array($having)) {
            if (count($having) === 1) {
                $this->_having = $having[0];
            } else {
                $items = [];
                /** @noinspection ForeachSourceInspection */
                foreach ($having as $item) {
                    $items[] = '(' . $item . ')';
                }
                $this->_having = implode(' AND ', $items);
            }
        } else {
            $this->_having = $having;
        }

        if ($bind) {
            $this->_bind = array_merge($this->_bind, $bind);
        }

        return $this;
    }
432341
public function group($rule, $having = null){
		if($this->validateConditions())
			return $this;

		$this->resetState();
		$this->grouping = array($rule, $having);
		return $this;
	}