• Модуль: perfmon
  • Путь к файлу: ~/bitrix/modules/perfmon/lib/sql/constraint.php
  • Класс: BitrixPerfmonSqlConstraint
  • Вызов: Constraint::getCreateDdl
public function getCreateDdl($dbType = '')
{
	switch ($dbType)
	{
	case "MYSQL":
		return "ALTER TABLE ".$this->parent->name." ADD CONSTRAINT ".$this->name." ".$this->body;
	case "MSSQL":
		return "ALTER TABLE ".$this->parent->name." ADD CONSTRAINT ".$this->name." ".$this->body;
	case "ORACLE":
		return "ALTER TABLE ".$this->parent->name." ADD CONSTRAINT ".$this->name." ".$this->body;
	default:
		return "// ".get_class($this).":getCreateDdl for database type [".$dbType."] not implemented";
	}
}