コード例 #1
0
ファイル: PrimaryKeyTest.php プロジェクト: seytar/psx
 public function testFilterTableWithoutPk()
 {
     $table = new Table($this->connection, 'psx_handler_comment', array('name' => TableInterface::TYPE_VARCHAR));
     $filter = new PrimaryKey($table);
     $this->assertEquals(false, $filter->apply(1));
     $this->assertEquals(false, $filter->apply(32));
 }
コード例 #2
0
ファイル: TestUtil.php プロジェクト: Tom-Byrne/gocdb
 public static function createSampleSite($label)
 {
     $site = new Site();
     $v4PK = new PrimaryKey();
     $site->setPrimaryKey($v4PK->getId());
     $site->setShortName($label);
     return $site;
 }
コード例 #3
0
ファイル: Row.php プロジェクト: timetoogo/penumbra
 /**
  * Whether or not the row has a complete primary key.
  * 
  * @return boolean
  */
 public final function HasPrimaryKey()
 {
     return count(array_filter($this->PrimaryKey->GetData(), function ($Value) {
         return $Value !== null;
     })) === $this->PrimaryKeyColumnsAmount;
 }