classKill
final class Kill
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.KILL [CONNECTION | QUERY] processlist_id: a request to end a connection or the statement it runs.
Mirrors SQLCOM_KILL with LEX::kill_value_list. Rule: MYSQL-KILL-001. The identifier is an expression the server evaluates where no relation is visible; its facts are derived there. The statement returns no rows. Source: https://dev.mysql.com/doc/refman/8.4/en/kill.html. Status: Implemented.
$kill = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('kill query 42');
[$kill->toString(), $kill->statement->scope] // => ['KILL QUERY 42', \SqlSemantics\Platform\MySql\Statement\Server\Instance\KillScope::Query]Properties§
public KillScope|null $scopepublic Scalar $processMethods§
public function __construct(public KillScope|null $scope, public Scalar $process)Parameters
$scope | KillScope|null | CONNECTION or QUERY, when written |
$process | Scalar | The processlist identifier |
public function deriveStatement(Derivation $derivation): voidDerives the identifier where no relation is visible.
Parameters
$derivation | Derivation |
Calls 2
- method-call Derivation::scalar() line 44
- method-call Derivation::environment() line 44
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 52
- method-call Output::node() line 56
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.