final class Column
    uses Snapshot
Public API: explicitly declared with @visibility public.

A column declaration supplied to an analysis context.

Resolved references point to this object itself; it is never copied.

Reaching the declared column from a query fielddoctest
$semantics = new \SqlSemantics\Platform\MySql\Semantics();
    $table = $semantics->analyze('CREATE TABLE t (a INTEGER NOT NULL)')->declarations()[0];
    $semantics->analyze('SELECT a FROM t', [$table])->field('a')->column() === $table->columns[0] // => true

Properties§

public Name $name
public Nullability $nullability = Nullability::Nullable
public bool $generated = false

Methods§

public function __construct(
    public Name $name,
    public TypeDescriptor $type,
    public Nullability $nullability = Nullability::Nullable,
    public bool $generated = false,
)

Parameters

$nameNameThe column name
$typeTypeDescriptorThe declared type
$nullabilityNullabilityWhether the column can hold NULL
$generatedboolWhether the column is computed from other columns of its row and cannot be written
Calls 1

Test cases 94§

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

Other tests reaching this symbol 94

Relations§

Instantiated in 5
Constant reads 1
Type declarations 9