classCachedIndexes
final class CachedIndexes
Checks and writes the table, partitions and index list of one entry of CACHE INDEX or LOAD INDEX INTO CACHE.
Rule: MYSQL-CACHED-INDEXES-001. An entry names a table qualified by at most a database, optionally the partitions PARTITION (…), and optionally an index list INDEX (…): an absent list selects every index, an empty list none, as the server's USE INDEX hints do (init_index_hints with INDEX_HINT_USE); PRIMARY names the primary key. KEY and INDEX are synonyms; INDEX is written. Terminates: one pass over the list. Source: https://dev.mysql.com/doc/refman/8.4/en/cache-index.html, https://dev.mysql.com/doc/refman/8.4/en/load-index.html. Status: Implemented.
Methods§
public function checked(
QualifiedName $table,
array<object>|null $indexes,
): list<Name|PrimaryIndex>|nullChecks an index list.
Parameters
$table | QualifiedName | |
$indexes | array<object>|null |
Returns
list<Name|PrimaryIndex>|nullTest cases 1
Called from 2
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\CachedTable::__construct() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/CachedTable.php:46
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\PreloadedTable::__construct() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/PreloadedTable.php:47
Calls 2
- static-call Check::input() line 40
- function-call
array_is_listline 45
public function render(
Output $out,
QualifiedName $table,
?PartitionSelection $partitions,
list<Name|PrimaryIndex>|null $indexes,
): voidWrites the table, its partitions and its index list.
Parameters
$out | Output | |
$table | QualifiedName | |
$partitions | ?PartitionSelection | |
$indexes | list<Name|PrimaryIndex>|null |
Called from 2
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\CachedTable::render() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/CachedTable.php:54
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\PreloadedTable::render() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/PreloadedTable.php:55
Calls 7
- method-call Output::name() line 62
- class-const NameUse::Qualifier() line 62
- class-const NameUse::Relation() line 64
- method-call Output::keyword() line 66
- method-call Output::symbol() line 74
- class-const NameUse::Identifier() line 77
- method-call Output::node() line 79
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 4
- new SqlSemantics\Platform\MySql\Statement\Server\KeyCache\CachedTable::__construct() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/CachedTable.php:46
- new SqlSemantics\Platform\MySql\Statement\Server\KeyCache\CachedTable::render() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/CachedTable.php:54
- new SqlSemantics\Platform\MySql\Statement\Server\KeyCache\PreloadedTable::__construct() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/PreloadedTable.php:47
- new SqlSemantics\Platform\MySql\Statement\Server\KeyCache\PreloadedTable::render() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/PreloadedTable.php:55
Method calls 4
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\CachedTable::__construct() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/CachedTable.php:46
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\CachedTable::render() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/CachedTable.php:54
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\PreloadedTable::__construct() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/PreloadedTable.php:47
- method-call SqlSemantics\Platform\MySql\Statement\Server\KeyCache\PreloadedTable::render() packages/sql-semantics-mysql/src/Statement/Server/KeyCache/PreloadedTable.php:55