final class EnclosedQuery
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Writes the 5.x form of CREATE TABLE ... SELECT whose PARTITION BY clause stands inside the parenthesis that opens the query.

Rule: MYSQL-ENCLOSED-PARTITIONING-001. MySQL 5.6 and 5.7 accept CREATE TABLE t (PARTITION BY … SELECT …) UNION … (create2a: opt_create_partitioning create_select ')' union_opt): the partitioning belongs to the table and the parenthesized SELECT is the first operand of the query, as in CREATE TABLE t PARTITION BY … (SELECT …) UNION …. The query's first operand is reached through the left operands of set operations and leading unions and the body of a query expression without a WITH clause; it must be a parenthesized query. The partitioning is written after its opening parenthesis, everything else as the query writes it (MYSQL-QUERY-TAIL-001). Terminates: the walk follows strict subtrees. Source: sql/sql_yacc.yy of MySQL 5.7 (create2a), https://dev.mysql.com/doc/refman/5.7/en/create-table-select.html. Status: Implemented.

Methods§

public function accepts(Query $query): bool

Tells whether the first operand of a query is a parenthesized query that the partitioning can be written into.

Parameters

$queryQuery

Returns

bool
Test cases 2
Called from 1

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2

Relations§

Instantiated in 2
Method calls 2