Merge pull request #18135 from kamil-tekiela/Remove-generateRowQueryOutput

Remove generateRowQueryOutput() method
This commit is contained in:
Maurício Meneghini Fauth 2023-02-21 12:03:48 -03:00 committed by GitHub
commit 193862ca92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 44 deletions

View File

@ -414,47 +414,6 @@ class Generator
return ['pos' => $pos, 'unlim_num_rows' => $numberOfLine, 'rows' => $rows, 'sql_query' => $sqlQuery];
}
/**
* Execute an EXPLAIN query and formats results similar to MySQL command line
* utility.
*
* @param string $sqlQuery EXPLAIN query
*
* @return string query results
*/
private static function generateRowQueryOutput($sqlQuery): string
{
$ret = '';
$result = $GLOBALS['dbi']->query($sqlQuery);
$devider = '+';
$columnNames = '|';
$fieldsMeta = $GLOBALS['dbi']->getFieldsMeta($result);
foreach ($fieldsMeta as $meta) {
$devider .= '---+';
$columnNames .= ' ' . $meta->name . ' |';
}
$devider .= "\n";
$ret .= $devider . $columnNames . "\n" . $devider;
while ($row = $result->fetchRow()) {
$values = '|';
foreach ($row as $value) {
if ($value === null) {
$value = 'NULL';
}
$values .= ' ' . $value . ' |';
}
$ret .= $values . "\n";
}
$ret .= $devider;
return $ret;
}
/**
* Prepare the message and the query
* usually the message is the result of the query executed

View File

@ -8871,9 +8871,6 @@
<code><![CDATA[$_REQUEST['session_max_rows']]]></code>
<code><![CDATA[$_REQUEST['unlim_num_rows']]]></code>
</RiskyCast>
<UnusedMethod>
<code>generateRowQueryOutput</code>
</UnusedMethod>
</file>
<file src="libraries/classes/Image/ImageWrapper.php">
<PossiblyUnusedReturnValue>