classShowWarningCount
final class ShowWarningCount
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.SHOW COUNT(*) WARNINGS: the number of warnings of the last statement of the session.
Rule: MYSQL-SHOW-WARNINGCOUNT-001. The server reads it as SELECT @@session.warning_count, which names its one column. The columns are those of the layout of MYSQL-SHOW-ROWS-001. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-warnings.html. Status: Implemented.
$show = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SHOW COUNT(*) WARNINGS');
[$show->field(0)->name?->value, $show->toString()] // => ['@@session.warning_count', 'SHOW COUNT(*) WARNINGS']Methods§
public function deriveStatement(Derivation $derivation): voidDerives the rows.
Parameters
$derivation | Derivation |
Calls 3
- method-call ShowFacts::rows() line 38
- new ShowFacts line 38
- class-const Report::WarningCount() line 38
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyShowRule::session() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyShowRule.php:94
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ShowRule::statement() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ShowRule.php:64