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

Applies the attributes of a column definition in written order, as the server sets its column flags.

Rule: MYSQL-COLUMN-FLAGS-001. The type SERIAL sets NOT NULL (it is BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE). NOT NULL, AUTO_INCREMENT, SERIAL DEFAULT VALUE and PRIMARY KEY (or KEY) set NOT NULL; NULL clears it and marks the column explicitly nullable; a later attribute overrides an earlier one (PT_null_column_attr, PT_not_null_column_attr, PT_auto_increment_column_attr, PT_serial_default_value_column_attr, PT_primary_key_column_attr in sql/parse_tree_column_attrs.h; the attribute actions of sql_yacc.yy in 5.6 and 5.7). A primary key column is NOT NULL: "If they are not explicitly declared as NOT NULL, MySQL declares

  • them so implicitly (and silently)"; one that is still explicitly NULL is an

error from 5.7 on (MYSQL-TABLE-PROBLEMS-001). A TIMESTAMP column without NULL or NOT NULL is NOT NULL when the server variable explicit_defaults_for_timestamp is OFF and nullable when it is ON; the profile does not carry that variable, so its NULL fact is Dependent. The last of VISIBLE and INVISIBLE decides the visibility. Terminates: one pass over the attributes. Source: https://dev.mysql.com/doc/refman/8.4/en/create-table.html, https://dev.mysql.com/doc/refman/8.4/en/numeric-type-syntax.html (SERIAL), https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp, https://dev.mysql.com/doc/refman/8.4/en/invisible-columns.html. Status: Implemented.

Methods§

public function nullability(
    ColumnSpecification $specification,
    bool $keyed = false,
): Nullability

Test cases 3§

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

Dedicated tests 3

Relations§

Instantiated in 4
Method calls 4