packages/sql-semantics-mysql/src/Statement/Table/TableElement.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Table;
6
7use SqlSemantics\Platform\MySql\Model\Construction\Derivation;
8use SqlSemantics\Platform\MySql\Model\Resolution\Environment;
9use SqlSemantics\Platform\MySql\Model\Statement\Node;
10
11/**
12 * One element of a table definition: a column, an index, or a constraint.
13 *
14 * The table definition family provides the structures; ALTER TABLE ... ADD holds
15 * them.
16 * Source: https://dev.mysql.com/doc/refman/8.4/en/create-table.html.
17 */
18interface TableElement extends Node
19{
20 /**
21 * Derives the expressions inside the element at a position whose visible relation is the table being defined or changed.
22 */
23 public function deriveElement(Derivation $derivation, Environment $scope): void;
24}
25