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.

Changing the access methoddoctest
$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 $method

Methods§

public function __construct(public Name|null $method)

Parameters

$methodName|nullThe access method; null for DEFAULT
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the access method is a catalog name.

Parameters

$derivationDerivation
$environmentEnvironment
public function render(Output $out): void

Writes the action.

Parameters

$outOutput
Calls 2

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 2
Type checks 1