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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user