Пример #1
0
 public function addColumn(Type $column)
 {
     if (isset($this->exclude[$column->getName()])) {
         //trigger_error($this->name() . "." . $column->getName() . ": this column is not acceptable", E_USER_WARNING);
         throw new Exception();
     }
     if ($column->getIndex() == self::ROLE_PRIMARY) {
         $this->combinedIndexes["PRIMARY"][$column->getIndex()][$column->getName()] = $column->getName();
     } elseif ($column->getIndex() == self::ROLE_INDEX || $column->getIndex() == self::ROLE_UNIQUE) {
         $this->combinedIndexes[$column->getName()][$column->getIndex()][$column->getName()] = $column->getName();
     }
     $this->exclude[$column->getName()] = $column->getName();
     $this->columns[$column->getName()] = $column;
     return $this;
 }