final class TableConstraintDefWithOptConstraintNameCheckConstraintOptConstraintEnforcement_21fd9e18
    implements TableConstraintDefForm, TableElementForm, TableElementListForm
    uses Assertion
Public API: explicitly declared with @visibility public.

The table_constraint_def SQL value; generated by bin/build-models.php.

Accept a structured SQL valuedoctest
$write = static fn (\SqlSemantics\Statement\Model\MySql\Value\TableConstraintDefWithOptConstraintNameCheckConstraintOptConstraintEnforcement_21fd9e18 $value): string => \SqlSemantics\Statement\Writer::render($value);
    $write instanceof \Closure // => true

Properties§

public OptConstraintNameForm $optConstraintName
public CheckConstraintForm $checkConstraint
public OptConstraintEnforcementForm $optConstraintEnforcement
public Comments $comments = new \SqlSemantics\Statement\Comments()

Methods§

public function __construct(
    public OptConstraintNameForm $optConstraintName,
    public CheckConstraintForm $checkConstraint,
    public OptConstraintEnforcementForm $optConstraintEnforcement,
    public Comments $comments = new \SqlSemantics\Statement\Comments(),
)

Supplies the SQL values of this form; comments are kept by the position of the symbol each precedes.

Parameters

$optConstraintNameOptConstraintNameForm
$checkConstraintCheckConstraintForm
$optConstraintEnforcementOptConstraintEnforcementForm
$commentsComments
Calls 3
public function write(Writer $writer): void

Writes SQL entirely from this value's fields.

Parameters

$writerWriter
Calls 4
public function withOptConstraintName(OptConstraintNameForm $optConstraintName): self

Returns a copy with a new optConstraintName, preserving every other field.

Parameters

$optConstraintNameOptConstraintNameForm

Returns

self
Calls 1
public function withCheckConstraint(CheckConstraintForm $checkConstraint): self

Returns a copy with a new checkConstraint, preserving every other field.

Parameters

$checkConstraintCheckConstraintForm

Returns

self
Calls 1
public function withOptConstraintEnforcement(OptConstraintEnforcementForm $optConstraintEnforcement): self

Returns a copy with a new optConstraintEnforcement, preserving every other field.

Parameters

$optConstraintEnforcementOptConstraintEnforcementForm

Returns

self
Calls 1
public function withComments(Comments $comments): self

Returns a copy with a new comments, preserving every other field.

Parameters

$commentsComments

Returns

self
Calls 1