classIndexEngineAttribute
final class IndexEngineAttribute
implements IndexOption
uses Snapshot
Public API: explicitly declared with
@visibility public.The ENGINE_ATTRIBUTE or SECONDARY_ENGINE_ATTRIBUTE of an index (MySQL 8.0.21 and later).
Source: https://dev.mysql.com/doc/refman/8.4/en/create-index.html.
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE TABLE t (a INT, KEY (a) ENGINE_ATTRIBUTE \'{}\')');
$create->statement->elements[1]->options[0] instanceof \SqlSemantics\Platform\MySql\Statement\Table\Key\Option\IndexEngineAttribute // => trueProperties§
public Text $attributepublic bool $secondary = falseMethods§
public function __construct(public Text $attribute, public bool $secondary = false)Parameters
$attribute | Text | The attribute document |
$secondary | bool | Whether it is the SECONDARY_ENGINE_ATTRIBUTE |
public function render(Output $out): voidTest 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 2
- new SqlSemantics\Platform\MySql\Lowering\TableDefinition\Key\KeyOptionRule::option() packages/sql-semantics-mysql/src/Lowering/TableDefinition/Key/KeyOptionRule.php:189
- new SqlSemantics\Platform\MySql\Lowering\TableDefinition\Key\KeyOptionRule::option() packages/sql-semantics-mysql/src/Lowering/TableDefinition/Key/KeyOptionRule.php:190