classSetAccessMethod
final class SetAccessMethod
implements AlterCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.SET ACCESS METHOD: changes the table access method, or to the default one.
Mirrors AT_SetAccessMethod. PostgreSQL 17 accepts DEFAULT, which is the default_table_access_method setting. Source: https://www.postgresql.org/docs/17/sql-altertable.html.
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t SET ACCESS METHOD heap');
$statement->statement->commands[0]->method->value // => 'heap'Properties§
public Name|null $methodMethods§
public function __construct(public Name|null $method)Parameters
$method | Name|null | The access method; null for DEFAULT |
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: the access method is a catalog name.
Parameters
$derivation | Derivation | |
$environment | Environment |
public function render(Output $out): voidWrites the action.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 49
- method-call Output::name() line 53
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
SetAccessMethodTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::setting() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:208
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::setting() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:209