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

Driver specific view detection

This commit is contained in:
Jakub Vrana
2010-05-27 13:31:08 +02:00
parent fe3d395912
commit da6f1f850b
9 changed files with 30 additions and 7 deletions

View File

@@ -359,7 +359,6 @@ if (!defined("DRIVER")) {
$row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]);
}
if (!isset($row["Rows"])) {
$row["Engine"] = "VIEW";
$row["Comment"] = "";
}
if ($name != "") {
@@ -370,6 +369,14 @@ if (!defined("DRIVER")) {
return $return;
}
/** Find out whether the identifier is view
* @param array
* @return bool
*/
function is_view($table_status) {
return !isset($table_status["Rows"]);
}
/** Check if table supports foreign keys
* @param array result of table_status
* @return bool