packages/sql-semantics-mysql/src/Statement/Alter/Problem/PartitionEntryRefused.php

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Alter\Problem;
6
7use SqlSemantics\Platform\MySql\Model\Statement\Fact\Diagnostic;
8use SqlSemantics\Platform\MySql\Model\Statement\Snapshot;
9
10/**
11 * A partitioning clause sent as a statement, which the server of 5.6 and 5.7 rejects with ER_PARTITION_ENTRY_ERROR.
12 *
13 * Source: https://github.com/mysql/mysql-server/blob/mysql-5.7.44/sql/sql_yacc.yy (rule partition_entry).
14 *
15 * @visibility public
16 * @example Describing the problem
17 *     (new \SqlSemantics\Platform\MySql\Statement\Alter\Problem\PartitionEntryRefused())->message() // => 'A partitioning clause is not a statement a client can send.'
18 */
19final class PartitionEntryRefused implements Diagnostic
20{
21    use Snapshot;
22
23    /**
24     * Describes the problem.
25     */
26    public function message(): string
27    {
28        return 'A partitioning clause is not a statement a client can send.';
29    }
30}
31