classReindex
final class Reindex
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.A request to rebuild indexes.
Rule: SQLITE-REINDEX-001. Without a name every index of every attached schema is rebuilt. An unqualified name is a collation name when a collation with that name is registered on the connection, otherwise a table or an index; a qualified name is a table or an index. Collations and indexes are not part of a declaration context, so the name is kept unresolved and no relation fact or diagnostic is recorded. Source: https://sqlite.org/lang_reindex.html. Status: Implemented.
$reindex = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('REINDEX main.users');
[$reindex->statement->target?->schema?->value, $reindex->statement->target?->name->value] // => ['main', 'users']Properties§
public QualifiedName|null $target = nullMethods§
public function __construct(public QualifiedName|null $target = null)Parameters
$target | QualifiedName|null | The collation, table or index name; null rebuilds every index |
Calls 1
- static-call Check::input() line 40
public function deriveStatement(Derivation $derivation): voidDerives nothing: the kind of object the name denotes is connection state.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 55
- method-call ObjectNames::write() line 57
- new ObjectNames line 57
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 1
Relations§
Instantiated in 2
- new SqlSemantics\Platform\Sqlite\Lowering\Definition\MaintenanceRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/MaintenanceRule.php:55
- new SqlSemantics\Platform\Sqlite\Lowering\Definition\MaintenanceRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/MaintenanceRule.php:56