getUniqueColumns() public méthode

returns an array with all columns with unique content, in fact these are all columns being single indexed in PRIMARY or UNIQUE e.g. - PRIMARY(id) // id - UNIQUE(name) // name - PRIMARY(fk_id1, fk_id2) // NONE - UNIQUE(x,y) // NONE
public getUniqueColumns ( boolean $backquoted = true, boolean $fullName = true ) : array
$backquoted boolean whether to quote name with backticks ``
$fullName boolean whether to include full name of the table as a prefix
Résultat array
Exemple #1
0
 /**
  * Test for getUniqueColumns
  *
  * @return void
  */
 public function testGetUniqueColumns()
 {
     $table = 'PMA_BookMark';
     $db = 'PMA';
     $table = new Table($table, $db);
     $return = $table->getUniqueColumns();
     $expect = array('`PMA`.`PMA_BookMark`.`index1`', '`PMA`.`PMA_BookMark`.`index3`', '`PMA`.`PMA_BookMark`.`index5`');
     $this->assertEquals($expect, $return);
 }