From e4e5941b9048c64f0c32ddc52006a730c72da793 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 20 Feb 2025 17:58:00 +0100 Subject: [PATCH] Wrap long lines --- adminer/drivers/mssql.inc.php | 4 +++- adminer/drivers/pgsql.inc.php | 10 +++++++++- adminer/include/editing.inc.php | 12 ++++++++++-- adminer/include/functions.inc.php | 5 ++++- adminer/select.inc.php | 4 +++- plugins/dump-alter.php | 8 +++++++- 6 files changed, 36 insertions(+), 7 deletions(-) diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index 34752629..de733073 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -363,7 +363,9 @@ if (isset($_GET["mssql"])) { function table_status($name = "") { $return = array(); - foreach (get_rows("SELECT ao.name AS Name, ao.type_desc AS Engine, (SELECT value FROM fn_listextendedproperty(default, 'SCHEMA', schema_name(schema_id), 'TABLE', ao.name, null, null)) AS Comment FROM sys.all_objects AS ao WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) { + foreach (get_rows("SELECT ao.name AS Name, ao.type_desc AS Engine, (SELECT value FROM fn_listextendedproperty(default, 'SCHEMA', schema_name(schema_id), 'TABLE', ao.name, null, null)) AS Comment +FROM sys.all_objects AS ao +WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) { if ($name != "") { return $row; } diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index a450380f..eb40104f 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -333,7 +333,15 @@ ORDER BY 1"; function table_status($name = "") { $return = array(); - foreach (get_rows("SELECT c.relname AS \"Name\", CASE c.relkind WHEN 'r' THEN 'table' WHEN 'm' THEN 'materialized view' ELSE 'view' END AS \"Engine\", pg_table_size(c.oid) AS \"Data_length\", pg_indexes_size(c.oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", " . (min_version(12) ? "''" : "CASE WHEN c.relhasoids THEN 'oid' ELSE '' END") . " AS \"Oid\", c.reltuples as \"Rows\", n.nspname + foreach (get_rows("SELECT + c.relname AS \"Name\", + CASE c.relkind WHEN 'r' THEN 'table' WHEN 'm' THEN 'materialized view' ELSE 'view' END AS \"Engine\", + pg_table_size(c.oid) AS \"Data_length\", + pg_indexes_size(c.oid) AS \"Index_length\", + obj_description(c.oid, 'pg_class') AS \"Comment\", + " . (min_version(12) ? "''" : "CASE WHEN c.relhasoids THEN 'oid' ELSE '' END") . " AS \"Oid\", + c.reltuples as \"Rows\", + n.nspname FROM pg_class c JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace) WHERE relkind IN ('r', 'm', 'v', 'f', 'p') diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index d4d2dae5..b883faf0 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -219,10 +219,18 @@ if ($foreign_keys) { $structured_types[lang('Foreign keys')] = $foreign_keys; } echo optionlist(array_merge($extra_types, $structured_types), $type); -?>" size="3" aria-labelledby="label-length">" + size="3" + + aria-labelledby="label-length">