final class PartitionEntry
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

A statement that is only a partitioning clause, PARTITION BY … (5.6 and 5.7).

Rule: MYSQL-PARTITION-ENTRY-001. The grammar of 5.6 and 5.7 has this statement so that the server can read the partitioning stored in a table definition file; sent by a client it fails with ER_PARTITION_ENTRY_ERROR, which is the diagnostic PartitionEntryRefused. No table is partitioned, so the clause is derived in a scope with no visible relation. The statement changes and provides no declaration. Source: https://github.com/mysql/mysql-server/blob/mysql-5.7.44/sql/sql_yacc.yy (rule partition_entry). Status: Implemented.

Reporting a partitioning clause sent as a statementdoctest
(new \SqlSemantics\Platform\MySql\Semantics('mysql-5.7.44'))->analyze('PARTITION BY KEY () PARTITIONS 2') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: A partitioning clause is not a statement a client can send.

Properties§

public PartitionClause $partitioning

Methods§

public function __construct(public PartitionClause $partitioning)

Parameters

$partitioningPartitionClauseThe partitioning clause
public function deriveStatement(Derivation $derivation): void

Reports the refusal and derives the clause without a table.

Parameters

$derivationDerivation
Calls 4
public function render(Output $out): void

Writes the clause.

Parameters

$outOutput
Calls 1

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 1
Type declarations 1