Class yii\db\conditions\ExistsCondition
| 继承 | yii\db\conditions\ExistsCondition |
|---|---|
| 实现 | yii\db\conditions\ConditionInterface |
| 可用版本自 | 2.0.14 |
| 源码 | https://github.com/yiichina/yii2/blob/api/framework/db/conditions/ExistsCondition.php |
表示 EXISTS 操作符的条件。
公共方法
| 方法 | 描述 | 被定义在 |
|---|---|---|
| __construct() | ExistsCondition 构造函数。 | yii\db\conditions\ExistsCondition |
| fromArrayDefinition() | 按照 文档:查询构建器 - 操作符格式 文档中的描述, 以数组定义创建对象。 | yii\db\conditions\ExistsCondition |
| getOperator() | yii\db\conditions\ExistsCondition | |
| getQuery() | yii\db\conditions\ExistsCondition |
方法详情
ExistsCondition 构造函数。
| public void __construct($operator, $query) | ||
| $operator | string | 要使用的操作符(例如: |
| $query | yii\db\Query | 表示子查询的 yii\db\Query 对象。 |
按照 文档:查询构建器 - 操作符格式 文档中的描述, 以数组定义创建对象。
| public static $this fromArrayDefinition($operator, $operands) | ||
| $operator | string | 操作符大写。 |
| $operands | array | 相应操作数的数组。 |
| throws | yii\base\InvalidParamException | 如果输入参数不匹配,则抛出 InvalidParamException 异常 |
|---|---|---|
| public string getOperator() |
| public yii\db\Query getQuery() |