protected function getTableIndexes(): array
    {
        $data = [];

        $idxs = $this->db->schema->getTableIndexes($this->tableName, true);

        /* @var $idx IndexConstraint */
        foreach ($idxs as $idx) {
            if (!$idx->isPrimary) {
                $data[$idx->name] = new TableIndex([
                    'name' => $idx->name,
                    'unique' => $idx->isUnique,
                    'columns' => $idx->columnNames
                ]);
            }
        }

        return $data;
    }
protected function getTableIndexes(): array
    {
        $data = [];

        $idxs = $this->db->schema->getTableIndexes($this->tableName, true);

        /* @var $idx IndexConstraint */
        foreach ($idxs as $idx) {
            if (!$idx->isPrimary) {
                $data[$idx->name] = new TableIndex([
                    'name' => $idx->name,
                    'unique' => $idx->isUnique,
                    'columns' => $idx->columnNames
                ]);
            }
        }

        return $data;
    }
protected function getTableIndexes ( ) : array { $ data = [ ] ; $ idxs = $ this -> db -> schema -> getTableIndexes ( $ this -> tableName , true ) ; /* @var $idx IndexConstraint */ foreach ( $ idxs as $ idx ) { if ( ! $ idx -> isPrimary ) { $ data [ $ idx -> name ] = new TableIndex ( [ 'name' => $ idx -> name , 'unique' => $ idx -> isUnique , 'columns' => $ idx -> columnNames ] ) ; } } return $ data ; }
Returns table indexes.
@return TableIndex[]
@since 2.2.2
Returns table indexes .