classShowStatus
final class ShowStatus
implements Statement, Relation
uses Snapshot
Public API: explicitly declared with
@visibility public.SHOW STATUS: the status variables of the server or the session.
Rule: MYSQL-SHOW-STATUS-001. GLOBAL reports the global values, SESSION (or LOCAL) and no scope the values of the session. LIKE matches the variable name. The rows and the WHERE condition are derived by MYSQL-SHOW-FACTS-001 from the layout of MYSQL-SHOW-ROWS-001. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-status.html. Status: Implemented.
$show = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SHOW LOCAL STATUS LIKE 'a%'");
[$show->statement->scope, $show->toString()] // => [\SqlSemantics\Platform\MySql\Statement\Variable\VariableScope::Session, "SHOW SESSION STATUS LIKE 'a%'"]Properties§
public ?VariableScope $scope = nullMethods§
public function __construct(
public ?VariableScope $scope = null,
public ShowLike|ShowWhere|null $filter = null,
)Parameters
$scope | ?VariableScope | The scope keyword |
$filter | ShowLike|ShowWhere|null | The LIKE or WHERE clause |
public function deriveStatement(Derivation $derivation): voidDerives the rows and the filter.
Parameters
$derivation | Derivation |
Calls 2
- method-call ShowFacts::derive() line 52
- new ShowFacts line 52
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFactDerives the result columns.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 3
- method-call ShowFacts::fact() line 60
- new ShowFacts line 60
- class-const Report::Variables() line 60
public function render(Output $out): voidTest cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::server() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:189
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ServerRule::statement() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ServerRule.php:70