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

One table whose indexes LOAD INDEX INTO CACHE preloads: t [PARTITION (…)] [INDEX (…)] [IGNORE LEAVES].

Mirrors PT_preload_keys. The statement that holds it records the resolution of the table name as the relation fact of this node. An absent index list preloads every index of the table, an empty list none; IGNORE LEAVES preloads only the non-leaf blocks (MYSQL-CACHED-INDEXES-001). Source: https://dev.mysql.com/doc/refman/8.4/en/load-index.html.

Holding a table and its index listdoctest
$table = new \SqlSemantics\Platform\MySql\Statement\Server\KeyCache\PreloadedTable(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()], true);
    [count($table->indexes ?? []), $table->ignoreLeaves] // => [1, true]

Properties§

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

Methods§

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

Parameters

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

Writes the table, the partitions, the index list and IGNORE LEAVES.

Parameters

$outOutput
Calls 3

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