mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 10:04:07 +02:00
Wrap long lines
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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')
|
||||
|
Reference in New Issue
Block a user