• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/connection.php
  • Класс: BitrixMainDBConnection
  • Вызов: Connection::parseSqlBatch
public function parseSqlBatch($sqlBatch)
{
	$delimiter = $this->getSqlHelper()->getQueryDelimiter();

	$sqlBatch = trim($sqlBatch);

	$statements = [];
	$sql = "";

	do
	{
		if (preg_match("%^(.*?)(['"`#]|--|\$\$|".$delimiter.")%is", $sqlBatch, $match))
		{
			//Found string start
			if ($match[2] == """ || $match[2] == "'" || $match[2] == "`")
			{
				$sqlBatch = mb_substr($sqlBatch, mb_strlen($match[0]));
				$sql .= $match[0];
				//find a quote not preceded by 
				if (preg_match("%^(.*?)(?