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

Pass $tableStatus to indexMethods, rename

This commit is contained in:
Jakub Vrana
2025-04-17 10:22:32 +02:00
parent a93f0003ae
commit dbec3a1b92
6 changed files with 20 additions and 19 deletions

View File

@@ -355,12 +355,12 @@ if (isset($_GET["pgsql"])) {
return "(SELECT oid FROM pg_class WHERE relnamespace = $this->nsOid AND relname = " . q($table) . " AND relkind IN ('r', 'm', 'v', 'f', 'p'))";
}
function indexMethods(): array {
static $methods = array();
if (!$methods) {
$methods = get_vals("SELECT amname FROM pg_am" . (min_version(9.6) ? " WHERE amtype = 'i'" : "") . " ORDER BY amname = 'btree' DESC, amname");
function indexAlgorithms(array $tableStatus): array {
static $return = array();
if (!$return) {
$return = get_vals("SELECT amname FROM pg_am" . (min_version(9.6) ? " WHERE amtype = 'i'" : "") . " ORDER BY amname = 'btree' DESC, amname");
}
return $methods;
return $return;
}
function supportsIndex(array $table_status): bool {