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.

Reading the statementdoctest
$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 = null
public ShowLike|ShowWhere|null $filter = null

Methods§

public function __construct(
    public ?Name $database = null,
    public ShowLike|ShowWhere|null $filter = null,
)

Parameters

$database?NameThe database written after FROM or IN; null for the current database
$filterShowLike|ShowWhere|nullThe LIKE or WHERE clause
public function deriveStatement(Derivation $derivation): void

Derives the rows and the filter.

Parameters

$derivationDerivation
Calls 2
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Derives the result columns.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 3
public function render(Output $out): void

Writes the statement.

Parameters

$outOutput
Calls 3

Test 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