classAttachIndex
final class AttachIndex
implements AlterCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.ATTACH PARTITION of ALTER INDEX: makes an index a partition of the altered partitioned index.
Mirrors AT_AttachPartition on an index. The index is looked up by the server; a version 1 context declares no indexes. Source: https://www.postgresql.org/docs/17/sql-altertable.html.
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER INDEX pi ATTACH PARTITION pi1');
$statement->toString() // => 'ALTER INDEX pi ATTACH PARTITION pi1'Properties§
public QualifiedName $indexMethods§
public function __construct(public QualifiedName $index)Parameters
$index | QualifiedName | The index |
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: the index is a catalog name.
Parameters
$derivation | Derivation | |
$environment | Environment |
public function render(Output $out): voidWrites the action.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 50
- method-call Spelling::qualified() line 51
- new Spelling line 51
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
AttachIndexTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 1
Type checks 2
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Command\AlterKinds::relationWide() packages/sql-semantics-postgres/src/Rules/Table/Command/AlterKinds.php:188
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Alterations::admits() packages/sql-semantics-postgres/src/Rules/Table/Command/Alterations.php:164