1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

Optimize retrieving columns for schema

This commit is contained in:
Jakub Vrana
2025-03-31 21:28:40 +02:00
parent 9f3f3b9515
commit 177429d59f
4 changed files with 31 additions and 4 deletions

View File

@@ -161,6 +161,16 @@ if (isset($_GET["sqlite"])) {
preg_match_all('~ CHECK *(\( *(((?>[^()]*[^() ])|(?1))*) *\))~', get_val("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = " . q($table), 0, $this->conn), $matches); //! could be inside a comment
return array_combine($matches[2], $matches[2]);
}
function allFields(): array {
$return = array();
foreach (tables_list() as $table => $type) {
foreach (fields($table) as $field) {
$return[$table][] = $field;
}
}
return $return;
}
}