/**
* @param Select $select
* @param array $parts
*
* @return $this
*/
public function writeSelectHaving(Select $select, array &$parts)
{
$str = '';
$havingArray = $select->getAllHavings();
if (\count($havingArray) > 0) {
$placeholder = $this->placeholderWriter;
$writer = $this->writer;
$str = 'HAVING ';
$separator = ' ' . $select->getHavingOperator() . ' ';
$havingArray = $this->getHavingConditions($havingArray, $select, $writer, $placeholder);
$str .= \implode($separator, $havingArray);
}
$parts = \array_merge($parts, [$str]);
return $this;
}