介面 yii\db\ConstraintFinderInterface
ConstraintFinderInterface 定義了用於獲取表格約束資訊的方法。
公共方法
方法 | 描述 | 定義於 |
---|---|---|
getSchemaChecks() | 傳回資料庫中所有表格的檢查約束。 | yii\db\ConstraintFinderInterface |
getSchemaDefaultValues() | 傳回資料庫中所有表格的預設值約束。 | yii\db\ConstraintFinderInterface |
getSchemaForeignKeys() | 傳回資料庫中所有表格的外鍵。 | yii\db\ConstraintFinderInterface |
getSchemaIndexes() | 傳回資料庫中所有表格的索引。 | yii\db\ConstraintFinderInterface |
getSchemaPrimaryKeys() | 傳回資料庫中所有表格的主鍵。 | yii\db\ConstraintFinderInterface |
getSchemaUniques() | 傳回資料庫中所有表格的唯一約束。 | yii\db\ConstraintFinderInterface |
getTableChecks() | 獲取指定表格的檢查約束資訊。 | yii\db\ConstraintFinderInterface |
getTableDefaultValues() | 獲取指定表格的預設值約束資訊。 | yii\db\ConstraintFinderInterface |
getTableForeignKeys() | 獲取指定表格的外鍵資訊。 | yii\db\ConstraintFinderInterface |
getTableIndexes() | 獲取指定表格的索引資訊。 | yii\db\ConstraintFinderInterface |
getTablePrimaryKey() | 獲取指定表格的主鍵。 | yii\db\ConstraintFinderInterface |
getTableUniques() | 獲取指定表格的唯一約束資訊。 | yii\db\ConstraintFinderInterface |
方法詳情
傳回資料庫中所有表格的檢查約束。
public abstract \yii\db\CheckConstraint[][] getSchemaChecks ( $schema = '', $refresh = false ) | ||
$schema | string |
表格的綱要 (schema)。預設為空字串,表示目前的或預設的綱要名稱。 |
$refresh | boolean |
是否獲取最新的可用表格綱要。如果此值為 false,則在可用的情況下可能會傳回快取資料。 |
return | \yii\db\CheckConstraint[][] |
資料庫中所有表格的 Check 约束。每個陣列元素都是 yii\db\CheckConstraint 或其子類別的陣列。 |
---|
public function getSchemaChecks($schema = '', $refresh = false);
傳回資料庫中所有表格的預設值約束。
public abstract yii\db\DefaultValueConstraint[] getSchemaDefaultValues ( $schema = '', $refresh = false ) | ||
$schema | string |
表格的綱要 (schema)。預設為空字串,表示目前的或預設的綱要名稱。 |
$refresh | boolean |
是否獲取最新的可用表格綱要。如果此值為 false,則在可用的情況下可能會傳回快取資料。 |
return | yii\db\DefaultValueConstraint[] |
資料庫中所有表格的預設值約束。每個陣列元素都是 yii\db\DefaultValueConstraint 或其子類別的陣列。 |
---|
public function getSchemaDefaultValues($schema = '', $refresh = false);
傳回資料庫中所有表格的外鍵。
public abstract \yii\db\ForeignKeyConstraint[][] getSchemaForeignKeys ( $schema = '', $refresh = false ) | ||
$schema | string |
表格的綱要 (schema)。預設為空字串,表示目前的或預設的綱要名稱。 |
$refresh | boolean |
是否獲取最新的可用表格綱要。如果此值為 false,則在可用的情況下可能會傳回快取資料。 |
return | \yii\db\ForeignKeyConstraint[][] |
資料庫中所有表格的外鍵。每個陣列元素都是 yii\db\ForeignKeyConstraint 或其子類別的陣列。 |
---|
public function getSchemaForeignKeys($schema = '', $refresh = false);
傳回資料庫中所有表格的索引。
public abstract \yii\db\IndexConstraint[][] getSchemaIndexes ( $schema = '', $refresh = false ) | ||
$schema | string |
表格的綱要 (schema)。預設為空字串,表示目前的或預設的綱要名稱。 |
$refresh | boolean |
是否獲取最新的可用表格綱要。如果此值為 false,則在可用的情況下可能會傳回快取資料。 |
return | \yii\db\IndexConstraint[][] |
資料庫中所有表格的索引。每個陣列元素都是 yii\db\IndexConstraint 或其子類別的陣列。 |
---|
public function getSchemaIndexes($schema = '', $refresh = false);
傳回資料庫中所有表格的主鍵。
public abstract yii\db\Constraint[] getSchemaPrimaryKeys ( $schema = '', $refresh = false ) | ||
$schema | string |
表格的綱要 (schema)。預設為空字串,表示目前的或預設的綱要名稱。 |
$refresh | boolean |
是否獲取最新的可用表格綱要。如果此值為 |
return | yii\db\Constraint[] |
資料庫中所有表格的主鍵。每個陣列元素都是 yii\db\Constraint 或其子類別的實例。 |
---|
public function getSchemaPrimaryKeys($schema = '', $refresh = false);
傳回資料庫中所有表格的唯一約束。
public abstract \yii\db\Constraint[][] getSchemaUniques ( $schema = '', $refresh = false ) | ||
$schema | string |
表格的綱要 (schema)。預設為空字串,表示目前的或預設的綱要名稱。 |
$refresh | boolean |
是否獲取最新的可用表格綱要。如果此值為 false,則在可用的情況下可能會傳回快取資料。 |
return | \yii\db\Constraint[][] |
資料庫中所有表格的 Unique 约束。每個陣列元素都是 yii\db\Constraint 或其子類別的陣列。 |
---|
public function getSchemaUniques($schema = '', $refresh = false);
獲取指定表格的檢查約束資訊。
public abstract yii\db\CheckConstraint[] getTableChecks ( $name, $refresh = false ) | ||
$name | string |
表格名稱。表格名稱可以包含綱要名稱 (schema name)(如果有的話)。請勿引用表格名稱。 |
$refresh | boolean |
即使在快取中找到資訊,是否重新載入資訊。 |
return | yii\db\CheckConstraint[] |
表格 Check 约束。 |
---|
public function getTableChecks($name, $refresh = false);
獲取指定表格的預設值約束資訊。
public abstract yii\db\DefaultValueConstraint[] getTableDefaultValues ( $name, $refresh = false ) | ||
$name | string |
表格名稱。表格名稱可以包含綱要名稱 (schema name)(如果有的話)。請勿引用表格名稱。 |
$refresh | boolean |
即使在快取中找到資訊,是否重新載入資訊。 |
return | yii\db\DefaultValueConstraint[] |
表格預設值約束。 |
---|
public function getTableDefaultValues($name, $refresh = false);
獲取指定表格的外鍵資訊。
public abstract yii\db\ForeignKeyConstraint[] getTableForeignKeys ( $name, $refresh = false ) | ||
$name | string |
表格名稱。表格名稱可以包含綱要名稱 (schema name)(如果有的話)。請勿引用表格名稱。 |
$refresh | boolean |
即使在快取中找到資訊,是否重新載入資訊。 |
return | yii\db\ForeignKeyConstraint[] |
表格外鍵。 |
---|
public function getTableForeignKeys($name, $refresh = false);
獲取指定表格的索引資訊。
public abstract yii\db\IndexConstraint[] getTableIndexes ( $name, $refresh = false ) | ||
$name | string |
表格名稱。表格名稱可以包含綱要名稱 (schema name)(如果有的話)。請勿引用表格名稱。 |
$refresh | boolean |
即使在快取中找到資訊,是否重新載入資訊。 |
return | yii\db\IndexConstraint[] |
表格索引。 |
---|
public function getTableIndexes($name, $refresh = false);
獲取指定表格的主鍵。
public abstract yii\db\Constraint|null getTablePrimaryKey ( $name, $refresh = false ) | ||
$name | string |
表格名稱。表格名稱可以包含綱要名稱 (schema name)(如果有的話)。請勿引用表格名稱。 |
$refresh | boolean |
即使在快取中找到資訊,是否重新載入資訊。 |
return | yii\db\Constraint|null |
表格主鍵,如果表格沒有主鍵,則為 |
---|
public function getTablePrimaryKey($name, $refresh = false);
獲取指定表格的唯一約束資訊。
public abstract yii\db\Constraint[] getTableUniques ( $name, $refresh = false ) | ||
$name | string |
表格名稱。表格名稱可以包含綱要名稱 (schema name)(如果有的話)。請勿引用表格名稱。 |
$refresh | boolean |
即使在快取中找到資訊,是否重新載入資訊。 |
return | yii\db\Constraint[] |
表格 Unique 约束。 |
---|
public function getTableUniques($name, $refresh = false);
為了評論,請註冊 或 登入。