Constraint
Less than 1 minute
Constraint
Methods
listConstraints
Retrieves a list of constraints for a given table or all tables in the schema.
public listConstraints(NULL $table, NULL $type, boolean $invertType = false, false $): void
Parameters
Parameter | Type | Description |
---|---|---|
$table | NULL | The name of the table. If null, constraints for all tables in the schema will be retrieved. |
$type | NULL | The type of constraints to retrieve. If null, all types of constraints will be retrieved. |
$invertType | boolean | Whether to invert the constraint type filter. If true, constraints of types other than the specified type will be retrieved. |
$ | false |
addConstraint
public addConstraint(string $constraintName, array $info): bool
Parameters
Parameter | Type | Description |
---|---|---|
$constraintName | string | |
$info | array |
dropConstraint
public dropConstraint(string $constraintName, string $tableName, bool $ifExists = false, bool $cascade = false): bool
Parameters
Parameter | Type | Description |
---|---|---|
$constraintName | string | |
$tableName | string | |
$ifExists | bool | |
$cascade | bool |
Generated by Hazaar API Doc Generator