class CheckConstraint

Methods

__construct(string|null $name, string $expression, bool $valid = true, bool $enforced = true, bool $noInherit = false)

Create a check constraint with its unevaluated SQL expression.

Details

at line 14
__construct(string|null $name, string $expression, bool $valid = true, bool $enforced = true, bool $noInherit = false)

Create a check constraint with its unevaluated SQL expression.

Parameters

string|null $name
string $expression
bool $valid

whether the declaration validates existing rows; false for NOT VALID or NOT ENFORCED

bool $enforced
bool $noInherit