classStorageProblem
final class StorageProblem
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A tablespace or log file group option that breaks a rule the server checks while it parses the statement.
The server rejects the statement with the error of the rule. Source: https://dev.mysql.com/doc/refman/8.4/en/create-tablespace.html.
(new \SqlSemantics\Platform\MySql\Statement\Server\Problem\StorageProblem(\SqlSemantics\Platform\MySql\Statement\Server\Problem\StorageRule::RepeatedOption, 'COMMENT'))->message() // => 'The COMMENT option is written more than once (ER_FILEGROUP_OPTION_ONLY_ONCE).'Properties§
public StorageRule $rulepublic string $optionMethods§
public function __construct(public StorageRule $rule, public string $option)Parameters
$rule | StorageRule | The broken rule |
$option | string | The keyword of the option, such as COMMENT or INITIAL_SIZE |
public function message(): stringDescribes the problem.
Returns
stringTest cases 1
Calls 3
- class-const StorageRule::RepeatedOption() line 38
- class-const StorageRule::WrongSize() line 39
- class-const StorageRule::SizeOverflow() line 40
Test cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 12
StorageOptionsTest::testDeriveReportsARepeatedOptioncallsStorageOptionsTest::testSizeReportsOverflowAndWrongWordscallsAlterLogfileGroupTest::testDeriveStatementReportsRejectedOptionscallsAlterTablespaceDatafileTest::testDeriveStatementReportsRejectedOptionscallsAlterTablespaceTest::testDeriveStatementReportsRejectedOptionscallsAlterUndoTablespaceTest::testDeriveStatementReportsRejectedOptionscallsCreateLogfileGroupTest::testDeriveStatementReportsRejectedOptionscallsCreateTablespaceTest::testDeriveStatementReportsRejectedOptionscallsCreateUndoTablespaceTest::testDeriveStatementReportsRejectedOptionscallsDropLogfileGroupTest::testDeriveStatementReportsRejectedOptionscallsDropTablespaceTest::testDeriveStatementReportsRejectedOptionscallsDropUndoTablespaceTest::testDeriveStatementReportsRejectedOptionscalls
Relations§
Instantiated in 4
- new SqlSemantics\Platform\MySql\Rules\Server\StorageOptions::derive() packages/sql-semantics-mysql/src/Rules/Server/StorageOptions.php:115
- new SqlSemantics\Platform\MySql\Rules\Server\StorageOptions::derive() packages/sql-semantics-mysql/src/Rules/Server/StorageOptions.php:122
- new SqlSemantics\Platform\MySql\Rules\Server\StorageOptions::size() packages/sql-semantics-mysql/src/Rules/Server/StorageOptions.php:161
- new SqlSemantics\Platform\MySql\Rules\Server\StorageOptions::size() packages/sql-semantics-mysql/src/Rules/Server/StorageOptions.php:167