final class ColumnDefinition

Describes one SQL column, including its type, default and constraints.

Properties§

public string $name
public string $type
public ?int $length = null
public ?int $precision = null
public ?int $scale = null
public bool $nullable = true
public bool $unsigned = false
public mixed $default = null
public bool $autoIncrement = false
public bool $generated = false
public list<string>|null $enumValues = null

Methods§

public function __construct(
    public string $name,
    public string $type,
    public ?int $length = null,
    public ?int $precision = null,
    public ?int $scale = null,
    public bool $nullable = true,
    public bool $unsigned = false,
    public mixed $default = null,
    public bool $autoIncrement = false,
    public bool $generated = false,
    public list<string>|null $enumValues = null,
)

Parameters

$namestring
$typestring
$length?int
$precision?int
$scale?int
$nullablebool
$unsignedbool
$defaultmixed
$autoIncrementbool
$generatedbool
$enumValueslist<string>|nullENUM/SET values

Test cases 643§

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

Dedicated tests 5
Other tests reaching this symbol 638

Relations§

Instantiated in 5
Type declarations 41