classAlterSystemSetting
final class AlterSystemSetting
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.ALTER SYSTEM SET ... or ALTER SYSTEM RESET ...: a request to change the server configuration file.
Rule: PG-ALTER-SYSTEM-001. Mirrors PostgreSQL's AlterSystemStmt, which holds a SET or RESET: a parameter set to values or to DEFAULT, or a parameter or ALL reset. The setting is derived as the request it is. Source: https://www.postgresql.org/docs/17/sql-altersystem.html. Status: Implemented.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER SYSTEM SET wal_level = replica');
[$operation->statement->setting->parameter->text(), $operation->toString()] // => ['wal_level', 'ALTER SYSTEM SET wal_level TO replica']new \SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\AlterSystemSetting(new \SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\SetParameterFrom(
new \SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\ParameterName([new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('a')]),
\SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\ParameterSource::Default,
true,
)) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstructionProperties§
public SetParameter|SetParameterFrom|Reset $settingMethods§
public function __construct(public SetParameter|SetParameterFrom|Reset $setting)Parameters
$setting | SetParameter|SetParameterFrom|Reset | The SET or RESET applied to the configuration file |
Calls 3
- static-call Check::input() line 41
- class-const ParameterSource::Default() line 42
- class-const SpecialParameter::All() line 43
public function deriveStatement(Derivation $derivation): voidDerives the SET or RESET.
Parameters
$derivation | Derivation |
Calls 1
- method-call Derivation::statement() line 51
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
AlterSystemSettingTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:103
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:104