示例#1
0
 public function getStoragePrimaryKey()
 {
     if (!$this->storagePrimaryKey) {
         $primaryKey = $this->databaseStructure->getPrimaryKey($this->getStorageName());
         if (!$primaryKey) {
             throw new InvalidArgumentException("Storage '{$this->getStorageName()}' has not defined any primary key.");
         }
         $this->storagePrimaryKey = (array) $primaryKey;
     }
     return $this->storagePrimaryKey;
 }
示例#2
0
 public function getPrimary($table)
 {
     return $this->structure->getPrimaryKey($table);
 }