mongodb\QueryBuilder buildInCondition()

buildInCondition() public method

Creates an Mongo condition with the IN operator.

public array buildInCondition ( $operator, $operands )
$operator string

The operator to use (e.g. IN or NOT IN)

$operands array

The first operand is the column name. If it is an array a composite IN condition will be generated. The second operand is an array of values that column value should be among.

return array

The generated Mongo condition.

throws yii\base\InvalidParamException

if wrong number of operands have been given.

doc_Yii
2016-10-30 17:09:03
Comments
Leave a Comment

Please login to continue.