Final Class Yiisoft\Db\Constraint\Check
| Inheritance | Yiisoft\Db\Constraint\Check |
|---|
Represents a CHECK constraint in a database.
A CHECK constraint is a constraint that allows you to specify a condition that must be met for the data to be
inserted or updated.
The constraint checks that the value of a specified column or expression meets a certain condition, if the condition isn't met, an error will be thrown, and the data won't be inserted or updated.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $columnNames | array | Yiisoft\Db\Constraint\Check | |
| $expression | string | Yiisoft\Db\Constraint\Check | |
| $name | string | Yiisoft\Db\Constraint\Check |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Db\Constraint\Check |
Property Details
Method Details
| public mixed __construct ( string $name = '', string[] $columnNames = [], string $expression = '' ) | ||
| $name | string |
The constraint name. |
| $columnNames | string[] |
The list of column names the constraint belongs to. |
| $expression | string |
The SQL of the |
public function __construct(
public readonly string $name = '',
public readonly array $columnNames = [],
public readonly string $expression = '',
) {}
Signup or Login in order to comment.