classPreloadedTable
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.
$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 $indexespublic QualifiedName $tablepublic PartitionSelection|null $partitions = nullpublic bool $ignoreLeaves = falseMethods§
public function __construct(
public QualifiedName $table,
public PartitionSelection|null $partitions = null,
list<Name|PrimaryIndex>|null $indexes = null,
public bool $ignoreLeaves = false,
)Parameters
$table | QualifiedName | The table name with its optional database |
$partitions | PartitionSelection|null | The partitions, when written |
$indexes | list<Name|PrimaryIndex>|null | The indexes, when an index list is written |
$ignoreLeaves | bool | Whether IGNORE LEAVES is written |
Calls 2
- method-call CachedIndexes::checked() line 47
- new CachedIndexes line 47
public function render(Output $out): voidWrites the table, the partitions, the index list and IGNORE LEAVES.
Parameters
$out | Output |
Calls 3
- method-call CachedIndexes::render() line 55
- new CachedIndexes line 55
- method-call Output::keyword() line 57
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
PreloadedTableTestcalls