Compiles the `having` statements.
766234
function having() {
    var havings = this.grouped.having;
    if (!havings) {
      return '';
    }
    var sql = ['having'];
    for (var i = 0, l = havings.length; i < l; i++) {
      var str = '',
          s = havings[i];
      if (i !== 0) {
        str = s.bool + ' ';
      }
      if (s.type === 'havingBasic') {
        sql.push(str + this.formatter.columnize(s.column) + ' ' + this.formatter.operator(s.operator) + ' ' + this.formatter.parameter(s.value));
      } else {
        if (s.type === 'whereWrapped') {
          var val = this.whereWrapped(s);
          if (val) {
            sql.push(val);
          }
        } else {
          sql.push(str + this.formatter.unwrapRaw(s.value));
        }
      }
    }
    return sql.length > 1 ? sql.join(' ') : '';
  }
836855
public function having($key, $value = true, $operator = '=')
    {
        return $this->addCondition($key, $value, $operator, 'having');
    }
815788
public function having($condition, $value = null, $logic = 'AND')
    {
        return $this->_append('Having', array($condition, $value), $logic);
    }
782710
public function addHaving( $having )
	{
		if( is_array( $having ) )
			return $this->addHavings( $having );
		if( in_array( $having, $this->havings ) )
			return FALSE;
		$this->havings[] = $having;
		return TRUE;
	}
565065
public function having($column, $comp = '=', $value = null, $boolean = 'and')
    {
        if (!$this->isComporaisonOperator($comp)) {
            $value = $comp;
            $comp = '=';
        }

        if (is_null($this->havin)) {
            $this->havin = '`'.$column.'` '.$comp.' '.$value;
        } else {
            $this->havin .= ' '.$boolean.' `'.$column.'` '.$comp.' '.$value;
        }

        return $this;
    }
840248
public function compileWhile($expression)
    {
        $expression = $this->normalizeExpression($expression);
        
        preg_match('/ *(.*?) *(?:, *(.*))? *$/is', $expression, $matches);
        
        $iteration = isset($matches[2]) ? trim($matches[1]) : $expression;
        $length = isset($matches[2]) ? trim($matches[2]) : '';
        
        $initLoop = '$loop = new ' . Counter::class . "(); \$__currentLoopData = \$loop->start({$length}); \$__loops->addLoop(\$__currentLoopData);";
        
        return "<?php {$initLoop} while({$iteration}): ?>";
    }
394721
public function having($having = null) {
		if (!$having) {
			return $this->_config['having'];
		}
		$this->_config['having'] = array_merge(
			(array) $this->_config['having'], (array) $having
		);
		return $this;
	}
82819
public SqlBuilder having(final String what) {
    Assert.isTrue(null != groups && !groups.isEmpty());
    if (Strings.isNotEmpty(what)) having = what;
    return this;
  }
806668
public function having($conditions, $parameters = [])
	{
		$this->having = [];

		if (!empty($conditions)) {
			$this->addHaving($conditions, $parameters);
		}

		return $this;
	}
922938
public function addHaving(array $having): void
    {
        if (empty($having)) {
            return;
        }

        $firstClause = true;
        $this->statement .= ' HAVING ';
        foreach ($having as $clause) {
            if ($firstClause === false) {
                $this->statement .= ' ' . $clause['concatenator'] . ' ';
            }
            $placeholder = $this->addBindingValue($clause['key'], $clause['value']);
            $key = $this->quoteName($clause['key']);
            $this->statement .= sprintf('%s %s %s', $key, $clause['operator'], $placeholder);
            $this->statement .= PHP_EOL;
            $firstClause = false;
        }
    }
382782
public function having( $expression ) {
		$this->expressionValidator->validate( $expression, ExpressionValidator::VALIDATE_FUNCTION );

		$this->usageValidator->trackUsedPrefixes( $expression );
		$this->usageValidator->trackUsedVariables( $expression );
		$this->modifiers['HAVING'] = '(' . $expression . ')';
	}
14106
public function compileConditions()
    {
        // Find if-s
        $this->prepared = preg_replace('/@if\s?(.+)/', '<?php if($1) { ?>', $this->prepared);

        // Find elseif-s
        $this->prepared = preg_replace('/@elseif\s?(.+)/', '<?php } elseif($1) { ?>', $this->prepared);

        // Find else-s
        $this->prepared = preg_replace('/@else/', '<?php } else { ?>', $this->prepared);

        // Find endif-s
        $this->prepared = preg_replace('/@endif/', '<?php } ?>', $this->prepared);
    }
1328784
function having(column, operator, value) {
    if (column instanceof Raw && arguments.length === 1) {
      return this._havingRaw(column);
    }

    // Check if the column is a function, in which case it's
    // a having statement wrapped in parens.
    if (typeof column === 'function') {
      return this.havingWrapped(column);
    }

    this._statements.push({
      grouping: 'having',
      type: 'havingBasic',
      column: column,
      operator: operator,
      value: value,
      bool: this._bool()
    });
    return this;
  }
1239972
public function having()
    {
        $args = func_get_args();
        $count = count($args);
        
        if ($count == 1) {
            $this->having[] = $args[0];
        } else {
            $this->having[] = array_shift($args);
            
            if ($count == 2 && is_array($args[0]))
                $args = $args[0];
            
            if ($args)
                $this->having_params = array_merge($this->having_params, $args);
        }
        return $this;
    }
492727
protected final void verify() {
        collectInitialisers();
        verifyCandidates();
        verifyInitialisers();
        collectPossibleInitialValues();
        verifyPossibleInitialValues();
        collectEffectiveAssignmentInstructions();
        verifyEffectiveAssignmentInstructions();
        collectAssignmentGuards();
        verifyAssignmentGuards();
        end();
    }
1040373
private function havingWrapper()
    {
        return function ($parameter) {
            if ($parameter instanceof FragmentInterface) {

                //We are only not creating bindings for plan fragments
                if (!$parameter instanceof ParameterInterface && !$parameter instanceof BuilderInterface) {
                    return $parameter;
                }
            }

            if (is_array($parameter)) {
                throw new BuilderException('Arrays must be wrapped with Parameter instance');
            }

            //Wrapping all values with ParameterInterface
            if (!$parameter instanceof ParameterInterface && !$parameter instanceof ExpressionInterface) {
                $parameter = new Parameter($parameter, Parameter::DETECT_TYPE);
            };

            //Let's store to sent to driver when needed
            $this->havingParameters[] = $parameter;

            return $parameter;
        };
    }
1015217
protected function parseGrouping(){
		list($group, $having) = $this->stmt->getGrouping();
		return $this->tryDelimite("\nGROUP BY $group" . ($having !== null ? " HAVING $having" : ''));
	}