GetPrimaryKeyColumns() public method

Gets the table columns which are primary keys, indexed by their respective column name.
public GetPrimaryKeyColumns ( ) : Storm\Core\Relational\IColumn[]
return Storm\Core\Relational\IColumn[]
Beispiel #1
0
 public function SetTable(Relational\ITable $Table)
 {
     if ($this->Table === $Table) {
         return;
     }
     $PrimaryKeyColumns = $Table->GetPrimaryKeyColumns();
     if (count($PrimaryKeyColumns) === 0) {
         throw new Relational\RelationalException('Cannot generate keys for table %s without any primary key columns', $Table->GetName());
     }
     $this->OnSetPrimaryKeyColumns($PrimaryKeyColumns);
     $this->PrimaryKeyColumns = $PrimaryKeyColumns;
 }