• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/sqlhelper.php
  • Класс: BitrixMainDBSqlHelper
  • Вызов: SqlHelper::getAliasLength
public function getAliasLength();

/**
 * Returns quoted identifier.
 * 

* For example Title become : * - `Title` for MySQL * - "TITLE" for Oracle * - [Title] for Ms SQL *

* @param string $identifier Table or Column name. * * @return string * @see SqlHelper::getLeftQuote * @see SqlHelper::getRightQuote */ public function quote($identifier) { if (empty($this->idCache[$identifier])) { // security unshielding $quotedIdentifier = str_replace([$this->getLeftQuote(), $this->getRightQuote()], '', $identifier); // shield [[database.]tablename.]columnname if (str_contains($quotedIdentifier, '.')) { $quotedIdentifier = str_replace('.', $this->getRightQuote() . '.' . $this->getLeftQuote(), $quotedIdentifier); } // shield general borders $this->idCache[$identifier] = $this->getLeftQuote() . $quotedIdentifier . $this->getRightQuote(); } return $this->idCache[$identifier]; }