classCachedTable
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.
$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 ?? []) // => 1Properties§
public list<Name|PrimaryIndex>|null $indexespublic QualifiedName $tablepublic PartitionSelection|null $partitions = nullMethods§
public function __construct(
public QualifiedName $table,
public PartitionSelection|null $partitions = null,
list<Name|PrimaryIndex>|null $indexes = null,
)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 |
Calls 2
- method-call CachedIndexes::checked() line 46
- new CachedIndexes line 46
public function render(Output $out): voidWrites the table, the partitions and the index list.
Parameters
$out | Output |
Calls 2
- method-call CachedIndexes::render() line 54
- new CachedIndexes line 54
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CachedTableTestcalls