• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/entity/querychain.php
  • Класс: BitrixMainEntityQueryChain
  • Вызов: QueryChain::getSqlDefinition
public function getSqlDefinition($with_alias = false)
{
	$sql_def = $this->getLastElement()->getSqlDefinition();

	if ($with_alias)
	{
		$helper = $this->getLastElement()->getValue()->getEntity()->getConnection()->getSqlHelper();
		$sql_def .= ' AS ' . $helper->quote($this->getAlias());
	}

	return $sql_def;
}