1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-29 01:00:07 +02:00

Display indexes in Oracle (thanks to Marcello Verona)

This commit is contained in:
Jakub Vrana
2011-05-06 18:04:03 +02:00
parent fb9db96e4d
commit 1da3ca544a
3 changed files with 11 additions and 9 deletions

View File

@@ -425,10 +425,6 @@ if (!defined("DRIVER")) {
* @return array array($key_name => array("type" => , "columns" => array(), "lengths" => array()))
*/
function indexes($table, $connection2 = null) {
global $connection;
if (!is_object($connection2)) { // use the main connection if the separate connection is unavailable
$connection2 = $connection;
}
$return = array();
foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) {
$return[$row["Key_name"]]["type"] = ($row["Key_name"] == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? "INDEX" : "UNIQUE")));