getFromTableByChoice() public static method

Returns an array with all indexes from the given table of the requested types
public static getFromTableByChoice ( string $table, string $schema, integer $choices = 31 ) : Index[]
$table string table
$schema string schema
$choices integer choices
return Index[] array of indexes
Example #1
0
 /**
  * Get columns with indexes
  *
  * @param int $types types bitmask
  *
  * @return array an array of columns
  */
 function getColumnsWithIndex($types)
 {
     $columns_with_index = array();
     foreach (Index::getFromTableByChoice($this->_name, $this->_db_name, $types) as $index) {
         $columns = $index->getColumns();
         foreach ($columns as $column_name => $dummy) {
             $columns_with_index[] = $column_name;
         }
     }
     return $columns_with_index;
 }