classReplicaIdentity
final class ReplicaIdentity
implements AlterCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.REPLICA IDENTITY: what identifies a row in logical replication.
Mirrors ReplicaIdentityStmt; an index is named only for USING INDEX. Source: https://www.postgresql.org/docs/17/sql-altertable.html.
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t REPLICA IDENTITY USING INDEX k');
$statement->statement->commands[0]->index->value // => 'k'Properties§
public ReplicaIdentityKind $kindpublic Name|null $index = nullMethods§
public function __construct(public ReplicaIdentityKind $kind, public Name|null $index = null)Parameters
$kind | ReplicaIdentityKind | The identity |
$index | Name|null | The index for USING INDEX |
Calls 2
- static-call Check::input() line 36
- class-const ReplicaIdentityKind::Index() line 36
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 51
- method-call ReplicaIdentityKind::keywords() line 51
- method-call Output::name() line 53
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 4
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::replica() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:307
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::replica() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:308
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::replica() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:309
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::replica() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:310