classOptimizerHints
final class OptimizerHints
Finds optimizer hint comments, which the parser delivers as trivia and no rule can read yet.
Rule: MYSQL-OPTIMIZER-HINTS-001. From MySQL 5.7.7 on, the server reads a comment that starts with /*+ and follows, after whitespace only, one of the keywords SELECT, INSERT, REPLACE, UPDATE or DELETE as a list of optimizer hints of the statement; a hint changes the request, for example SET_VAR or MAX_EXECUTION_TIME. The parser of this library has no hint grammar: the comment is part of the whitespace before the next token. A statement with such a comment therefore has a part no rule structures, and the lowering reports it as a missing rule instead of dropping it. In MySQL 5.6 the comment is an ordinary comment. Terminates: one iterative pass over the tokens. Source: https://dev.mysql.com/doc/refman/8.4/en/optimizer-hints.html. Status: Specified.
Methods§
Private surface 1§
Implementation details, listed for orientation only.
private const KEYWORDS = ['SELECT_SYM' => true, 'INSERT' => true, 'INSERT_SYM' => true, 'REPLACE' => tru…Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.