src/PDO/SchemaPDOSqlite.php
/**
     * Returns all unique indexes for the given table.
     *
     * Each array element is of the following structure:
     *
     * ```php
     * [
     *     'IndexName1' => ['col1' [, ...]],
     *     'IndexName2' => ['col2' [, ...]],
     * ]
     * ```
     *
     * @param TableSchema $table the table metadata.
     *
     * @throws Exception|InvalidConfigException|Throwable
     *
     * @return array all unique indexes for the given table.
     */
Returns all unique indexes for the given table.
Each array element is of the following structure.



@param TableSchema $table the table metadata.



@return array all unique indexes for the given table.
Returns all unique indexes for the given table . Each array element is of the following structure . @param TableSchema $table the table metadata . @return array all unique indexes for the given table .
public function findUniqueIndexes(TableSchema $table): array
    {
        $indexList = $this->getPragmaIndexList($table->getName());
        $uniqueIndexes = [];
        foreach ($indexList as $index) {
            $indexName = $index['name'];
            $indexInfo = $this->getPragmaIndexInfo($index['name']);
            if ($index['unique']) {
                $uniqueIndexes[$indexName] = [];
                foreach ($indexInfo as $row) {
                    $uniqueIndexes[$indexName][] = $row['name'];
                }
            }
        }
        return $uniqueIndexes;
    }
public function findUniqueIndexes ( TableSchema $ table ) : array { $ indexList = $ this -> getPragmaIndexList ( $ table -> getName ( ) ) ; $ uniqueIndexes = [ ] ; foreach ( $ indexList as $ index ) { $ indexName = $ index [ 'name' ] ; $ indexInfo = $ this -> getPragmaIndexInfo ( $ index [ 'name' ] ) ; if ( $ index [ 'unique' ] ) { $ uniqueIndexes [ $ indexName ] = [ ] ; foreach ( $ indexInfo as $ row ) { $ uniqueIndexes [ $ indexName ] [ ] = $ row [ 'name' ] ; } } } return $ uniqueIndexes ; }
Returns all unique indexes for the given table.
Returns all unique indexes for the given table .
/** @psalm-var PragmaIndexList */ /** @psalm-var PragmaIndexInfo */