final class CachedTable
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One table whose indexes CACHE INDEX assigns to a key cache: t [PARTITION (…)] [INDEX (…)].

Mirrors PT_assign_to_keycache. The statement that holds it records the resolution of the table name as the relation fact of this node. An absent index list assigns every index of the table, an empty list none (MYSQL-CACHED-INDEXES-001). Source: https://dev.mysql.com/doc/refman/8.4/en/cache-index.html.

Holding a table and its index listdoctest
$table = new \SqlSemantics\Platform\MySql\Statement\Server\KeyCache\CachedTable(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('t')), null, [new \SqlSemantics\Platform\MySql\Statement\Relation\Hint\PrimaryIndex()]);
    count($table->indexes ?? []) // => 1

Properties§

public list<Name|PrimaryIndex>|null $indexes
public QualifiedName $table
public PartitionSelection|null $partitions = null

Methods§

public function __construct(
    public QualifiedName $table,
    public PartitionSelection|null $partitions = null,
    list<Name|PrimaryIndex>|null $indexes = null,
)

Parameters

$tableQualifiedNameThe table name with its optional database
$partitionsPartitionSelection|nullThe partitions, when written
$indexeslist<Name|PrimaryIndex>|nullThe indexes, when an index list is written
Calls 2
public function render(Output $out): void

Writes the table, the partitions and the index list.

Parameters

$outOutput
Calls 2

Test 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 1
Constant reads 1