classSettingRule
final class SettingRule
Lowers the configuration commands: SET, RESET, SHOW, ALTER SYSTEM, SET CONSTRAINTS and DISCARD.
Rule: PG-SETTING-LOWER-001. Scope: VariableSetStmt, set_rest, generic_set, set_rest_more, zone_value, opt_encoding, VariableResetStmt, reset_rest, generic_reset, SetResetClause, FunctionSetResetClause, VariableShowStmt, AlterSystemStmt, ConstraintsSetStmt, constraints_set_list, constraints_set_mode, DiscardStmt. Constructors: SetParameter, SetParameterFrom, SetTimeZone, SetSpecialSetting, SetTransaction, Reset, Show, AlterSystemSetting, SetConstraints, Discard. TO and =, and SESSION after SET, are noise (UtilityNoise). Termination: one pass; lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-set.html, https://www.postgresql.org/docs/17/sql-reset.html, https://www.postgresql.org/docs/17/sql-show.html, https://www.postgresql.org/docs/17/sql-altersystem.html, https://www.postgresql.org/docs/17/sql-set-constraints.html, https://www.postgresql.org/docs/17/sql-discard.html. Status: Implemented.
Methods§
Lowers a configuration command.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::clause() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:126
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\UtilityCommands::statement() packages/sql-semantics-postgres/src/Lowering/Utility/UtilityCommands.php:55
Calls 13
- method-call SettingRule::set() line 98
- method-call SettingRule::reset() line 101
- new Show line 102
- method-call SettingRule::parameter() line 102
- new AlterSystemSetting line 103
- method-call SettingRule::generic() line 103
- new SetConstraints line 105
- method-call SettingRule::constraints() line 105
- method-call SettingRule::deferred() line 105
- class-const SettingRule::SPECIAL() line 107
- class-const SettingRule::DISCARDED() line 108
- new Discard line 108
- static-call ImplementationGap::production() line 109
Lowers SetResetClause or FunctionSetResetClause: the SET or RESET attached to a role, a database or a routine.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 4
- method-call SettingRule::set() line 124
- method-call SettingRule::more() line 125
- method-call SettingRule::statement() line 126
- static-call ImplementationGap::production() line 127
Lowers set_rest.
Parameters
$rest | Node | |
$local | bool |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 4
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:98
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:99
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:100
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::clause() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:124
Calls 7
- new TransactionRule line 139
- new SetTransaction line 142
- class-const TransactionScope::Transaction() line 142
- method-call TransactionRule::modes() line 142
- class-const TransactionScope::SessionCharacteristics() line 143
- method-call SettingRule::more() line 144
- static-call ImplementationGap::production() line 145
Lowers set_rest_more.
Parameters
$rest | Node | |
$local | bool |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::clause() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:125
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::set() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:144
Calls 15
- method-call SettingRule::generic() line 161
- new SetParameterFrom line 162
- method-call SettingRule::parameter() line 162
- class-const ParameterSource::Current() line 162
- new SetTimeZone line 163
- method-call SettingRule::zone() line 163
- new SetSpecialSetting line 164
- class-const SpecialSetting::Catalog() line 164
- class-const SpecialSetting::Schema() line 165
- method-call SettingRule::names() line 166
- class-const SpecialSetting::Role() line 167
- class-const SpecialSetting::SessionAuthorization() line 168
- class-const SpecialSetting::XmlOption() line 170
- class-const SpecialSetting::TransactionSnapshot() line 171
- static-call ImplementationGap::production() line 172
public function generic(Node $set, bool $local): SetParameter|SetParameterFromLowers generic_set.
Parameters
$set | Node | |
$local | bool |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:103
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::more() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:161
Calls 5
- new SetParameter line 186
- method-call SettingRule::parameter() line 186
- new SetParameterFrom line 187
- class-const ParameterSource::Default() line 187
- static-call ImplementationGap::production() line 188
public function parameter(Node $name): ParameterNameLowers var_name into a parameter name.
Parameters
$name | Node |
Returns
Called from 5
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:102
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::more() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:162
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::generic() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:186
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::generic() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:187
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::reset() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:251
Calls 1
public function zone(Node $zone): StringConstant|Name|SignedNumber|TypedLiteral|ZoneKeywordLowers zone_value.
Parameters
$zone | Node |
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 5
- new TypedLiteral line 214
- new TypeName line 214
- class-const ZoneKeyword::Default() line 217
- class-const ZoneKeyword::Local() line 218
- static-call ImplementationGap::production() line 219
public function names(Node $encoding, bool $local): SetSpecialSettingLowers SET NAMES with its opt_encoding.
Parameters
$encoding | Node | |
$local | bool |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 3
- new SetSpecialSetting line 233
- class-const SpecialSetting::Names() line 233
- static-call ImplementationGap::production() line 236
Lowers reset_rest or generic_reset.
Parameters
$rest | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:101
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:104
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\SettingRule::reset() packages/sql-semantics-postgres/src/Lowering/Utility/SettingRule.php:250
Calls 5
- method-call SettingRule::reset() line 250
- new Reset line 251
- method-call SettingRule::parameter() line 251
- class-const SettingRule::SPECIAL() line 252
- static-call ImplementationGap::production() line 252
public function constraints(Node $list): list<QualifiedName>Lowers constraints_set_list; ALL is no name.
Parameters
$list | Node |
Returns
list<QualifiedName>Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 1
- static-call ImplementationGap::production() line 270
public function deferred(Node $mode): boolLowers constraints_set_mode: whether checking is deferred.
Parameters
$mode | Node |
Returns
boolThrows
ImplementationGap When the production has no ruleCalled from 1
Calls 1
- static-call ImplementationGap::production() line 286
Private surface 3§
Implementation details, listed for orientation only.
private const SPECIAL = ['reset_rest: TIME ZONE' => \SqlSemantics\Platform\PostgreSql\Statement\Utility…private const DISCARDED = ['DiscardStmt: DISCARD ALL' => \SqlSemantics\Platform\PostgreSql\Statement\Util…private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
SettingRuleTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\UtilityCommands::statement() packages/sql-semantics-postgres/src/Lowering/Utility/UtilityCommands.php:55
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\UtilityCommands::setReset() packages/sql-semantics-postgres/src/Lowering/Utility/UtilityCommands.php:71
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\UtilityCommands::statement() packages/sql-semantics-postgres/src/Lowering/Utility/UtilityCommands.php:55
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Utility\UtilityCommands::setReset() packages/sql-semantics-postgres/src/Lowering/Utility/UtilityCommands.php:71