classShowOpenTables
final class ShowOpenTables
implements Statement, Relation
uses Snapshot
Public API: explicitly declared with
@visibility public.SHOW OPEN TABLES: the tables open in the table cache.
Rule: MYSQL-SHOW-OPEN-TABLES-001. The columns are those of the layout of MYSQL-SHOW-ROWS-001 for the release; the database written after FROM or IN only selects the rows. The rows and the WHERE condition are derived by MYSQL-SHOW-FACTS-001. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-open-tables.html. Status: Implemented.
$show = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SHOW OPEN TABLES FROM shop LIKE 'a%'");
[$show->statement->database?->value, $show->toString()] // => ['shop', "SHOW OPEN TABLES FROM shop LIKE 'a%'"]Properties§
public ?Name $database = nullMethods§
public function deriveStatement(Derivation $derivation): voidDerives the rows and the filter.
Parameters
$derivation | Derivation |
Calls 2
- method-call ShowFacts::derive() line 53
- new ShowFacts line 53
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFactDerives the result columns.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 3
- method-call ShowFacts::fact() line 61
- new ShowFacts line 61
- class-const Report::OpenTables() line 61
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 69
- class-const NameUse::Qualifier() line 71
- method-call Output::node() line 73
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::schema() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:129
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ObjectRule::statement() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ObjectRule.php:75