classResetRule
final class ResetRule
Lowers RESET with its items and RESET PERSIST.
Rule: MYSQL-RESET-002. Scope: reset, reset_options, reset_option, slave_reset_options, opt_replica_reset_options, source_reset_options, master_or_binary_logs_and_gtids, opt_if_exists_ident, persisted_variable_ident. RESET SLAVE is legacy in 5.x and, from 8.0 to 8.3, the synonym of RESET REPLICA (the parser sets the same REFRESH_REPLICA flag and adds a deprecation warning); RESET MASTER is legacy up to 8.1 and, in 8.2 and 8.3, the synonym of RESET BINARY LOGS AND GTIDS. DEFAULT.variable names the component default. Constructs: Reset, ResetReplica, ResetBinaryLogs, ResetQueryCache, ResetPersist. Terminates: the item list is flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/reset.html, https://dev.mysql.com/doc/refman/8.4/en/reset-persist.html, https://dev.mysql.com/doc/relnotes/mysql/8.2/en/news-8-2-0.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers one RESET statement.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 8
- method-call ResetRule::persist() line 82
- method-call Form::node() line 82
- static-call ImplementationGap::production() line 85
- method-call Spine::items() line 88
- new Spine line 88
- method-call ResetRule::target() line 89
- method-call Lowering::form() line 89
- new Reset line 92
public function target(Form $form): ResetTargetLowers one item of RESET.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 11
- new ResetQueryCache line 103
- class-const ResetRule::REPLICAS() line 105
- method-call Lowering::form() line 107
- method-call Form::node() line 107
- function-call
countline 108 - new ResetReplica line 110
- class-const ResetRule::ALL() line 110
- static-call ImplementationGap::production() line 110
- class-const ResetRule::BINARY_LOGS() line 112
- new ResetBinaryLogs line 122
- method-call ResetRule::first() line 122
Lowers the TO clause of RESET BINARY LOGS AND GTIDS; an absent clause is null.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 2
- method-call Lowering::form() line 132
- static-call ImplementationGap::production() line 137
public function persist(Node $target): ResetPersistLowers RESET PERSIST.
Parameters
$target | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 4
- method-call Lowering::form() line 148
- new ResetPersist line 150
- static-call ImplementationGap::production() line 153
- new Name line 162
Private surface 4§
Implementation details, listed for orientation only.
private const REPLICAS = ['reset_option: SLAVE slave_reset_options' => \SqlSemantics\Platform\MySql\Stat…private const BINARY_LOGS = ['reset_option: MASTER_SYM' => \SqlSemantics\Platform\MySql\Statement\Replicati…private const ALL = ['slave_reset_options:' => false, 'slave_reset_options: ALL' => true, 'opt_repl…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
ResetRuleTestcalls