final class Collation
    implements ColumnConstraint
    uses Snapshot
Public API: explicitly declared with @visibility public.

A COLLATE column constraint: the default collating sequence of the column.

Rule: SQLITE-COLUMN-COLLATE-001. The name is kept as written. Collating sequences are registered on a connection and are not part of a declaration context, so an unknown name is not a diagnostic of the model. Source: https://sqlite.org/datatype3.html#collation. Status: Implemented.

Reading the collation of a columndoctest
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a TEXT COLLATE NOCASE)');
    $create->statement->columns[0]->constraints[0]->name->value // => 'NOCASE'

Properties§

public Name $name

Methods§

public function __construct(public Name $name)

Parameters

$nameNameThe collating sequence
public function deriveConstraint(Derivation $derivation, ConstraintScope $scope): void

Derives nothing: collating sequences are not declared in a context.

Parameters

$derivationDerivation
$scopeConstraintScope
public function render(Output $out): void

Writes the clause.

Parameters

$outOutput
Calls 2

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1