Constraint
Less than 1 minute
Constraint
interface ConstraintMethods
listConstraints
Retrieves a list of constraints for a given table or all tables in the schema.
public listConstraints(?string $table, ?string $type, bool $invertType, false $): voidParameters
| Parameter | Type | Description |
|---|---|---|
$table | string | |
$type | string | |
$invertType | bool | |
$ | false |
addConstraint
List all constraints for a table.
public addConstraint(string $constraintName, array $info): boolParameters
| Parameter | Type | Description |
|---|---|---|
$constraintName | string | |
$info | array |
dropConstraint
Drop a constraint from a table.
public dropConstraint(string $constraintName, string $tableName, bool $ifExists, bool $cascade): boolParameters
| Parameter | Type | Description |
|---|---|---|
$constraintName | string | |
$tableName | string | |
$ifExists | bool | |
$cascade | bool |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000