Builds an IN clause.

@param string $field
@param array  $values
@param bool   $isIn

@return string
8095
protected function buildIn($field, array $values, $isIn)
    {
        $operator = $isIn ? ' IN ' : ' NOT IN ';

        return $field.$operator.$this->parameterizeValues($values);
    }
647425
public static function in($values)
    {
        if ($values instanceof Arrayable) {
            $values = $values->toArray();
        }

        return new Rules\In(is_array($values) ? $values : func_get_args());
    }
52306
private function equalsExpression($field, array $values)
    {
        return $this->queryBuilder->expression()->eq($field, $this->parameter($values));
    }
11480
public function whereIn($field, $values)
    {
        foreach ($this->queries as $query) {
            $query->whereIn($field, $values);
        }

        return $this;
    }
142340
public function addWhereFieldNotIn($field, array $values, $table = ''): self
    {
        if (!$table) {
            $table = $this->getDbTableName();
        }

        if (!$values) {
            $values = [NULL];
        }
        foreach ($values as $k => & $v) {
            $v = sql_prepare($v);
        }
        unset($v);

        $this->addWhereFieldAsString('`'. $table .'`.`'. $field .'` NOT IN ("'. implode('", "', $values) .'")');

        return $this;
    }
1095308
public static function forField(IField $field, array $operators = null) : array
    {
        if ($operators === null) {
            $operators = $field->getProcessedType()->getConditionOperators();
        }

        $conditions = [];

        $arrayField = Field::name($field->getName())
                ->label($field->getLabel())
                ->arrayOfField($field)
                ->build();

        $stringField = Field::name($field->getName())
                ->label($field->getLabel())
                ->string()
                ->build();

        foreach ($operators as $operator) {
            if ($operator === ConditionOperator::IN || $operator === ConditionOperator::NOT_IN) {
                $conditions[] = new ColumnComponentOperator($operator, $arrayField);
            } elseif ($operator === ConditionOperator::STRING_CONTAINS || $operator === ConditionOperator::STRING_CONTAINS_CASE_INSENSITIVE) {
                $conditions[] = new ColumnComponentOperator($operator, $stringField);
            } else {
                $conditions[] = new ColumnComponentOperator($operator, $field);
            }
        }

        return $conditions;
    }
1018479
public function getValueWithMultipleWhere($wheres = '', $field = 'id', $fieldOutput = '')
    {
        if (is_array($wheres) && count($wheres) > 0) {
            foreach ($wheres as $key => $value) {
                if (is_array($value['value'])) {
                    $this->db->where($value['field'], $value['value'], self::OPERATOR_IS_IN);
                } else {
                    $this->db->where($value['field'], $value['value'], $value['operator']);
                }
            }
        } else {
            $this->db->where($field, $wheres, self::OPERATOR_EQUAL_TO);
        }
        $result = $this->db->getOne($this->table, $fieldOutput);
        $this->debug->debug(__FUNCTION__, 'GET Result => ' . json_encode($result));
        if (isset($result->$fieldOutput)) {
            return $result->$fieldOutput;
        } else {
            return NULL;
        }
    }
145658
public function whereInAll($field = '', $in = array())
		{
			$this->_whereInit($field);
			$this->wheres[$field]['$all'] = $in;

			return $this;
		}
148095
public function addWhereIn($column, $values, $operator = 'AND', $isIn = true)
    {
        if (($n = count($values)) < 1) {
            $condition = $isIn ? '0=1' : '1=1'; // 0=1 is used because in MSSQL value alone can't be used in WHERE
        } else if (1 === $n) {
            $value = reset($values);
            if (null === $value) {
                $condition = $this->quoteColumnName($column) . ($isIn ? ' IS NULL' : ' IS NOT NULL');
            } else {
                if ($value instanceof Expression) {
                    $condition = $this->quoteColumnName($column) . ($isIn ? '=' : '!=') . $value->expression;
                } else {
                    $bk = $this->getBindKey();
                    $this->addParam($bk, $value);
                    $condition = $this->quoteColumnName($column) . ($isIn ? '=' : '!=') . $bk;
                }
            }
        } else {
            $params = [];
            foreach ($values as $value) {
                if ($value instanceof Expression) {
                    $params[] = $value->expression;
                    continue;
                }
                $params[] = $bk = $this->getBindKey();
                $this->addParam($bk, $value);
            }
            $condition = $this->quoteColumnName($column) . ($isIn ? ' IN ' : ' NOT IN ') . '(' . implode(', ', $params) . ')';
        }
        return $this->addWhere($condition, [], $operator);
    }
507399
public function findWhereNotIn($field, array $values, $columns = ['*'])
    {
        return parent::findWhereNotIn(
            $this->getColumnName($field),
            $values,
            $this->getColumnsNames($columns)
        );
    }
1032538
public static Query notIn(String field, Object... values) {
        return new Query().notIn(field, values);
    }
1330673
public function findWhereIn($field, array $values, $columns = ['*'])
    {
        $this->applyCriteria();
        $this->applyScope();
        $model = $this->model->whereIn($field, $values)->get($columns);
        $this->resetModel();

        return $this->parserResult($model);
    }
463347
public function in(array $values)
    {
        foreach ($values as $value) {
            if (\is_array($value)) {
                $this->in($value);
            } else {
                $this->is($value);
            }
        }

        return $this;
    }
1339215
public function whereIn($field = '', $in = array())
		{
			$this->_whereInit($field);
			$this->wheres[$field]['$in'] = $in;

			return $this;
		}
1001652
public function isNull($field)
    {
        return new Expr\ComparisonExpression($field, new Expr\ValueIdentifier(null), Expr\ComparisonExpression::EQ);
    }
874914
public function in($field, array $values)
    {
        return function ($object) use ($field, $values) {
            return in_array(ClosureExpressionBuilder::getObjectFieldValue($object, $field), $values);
        };
    }
1367519
public function getWhereIn(string $table, string $field, array $values): array
    {
        try {
            $this->db->beginTransaction();

            $query = "SELECT * FROM $table WHERE $field IN (" . implode(',', $values) . ")";

            /** @var PDOStatement $stmt */
            $stmt = $this->db->prepare($query);
            $stmt->execute();

            $this->db->commit();
            $result = $stmt->fetchAll();

            if ($result === false) {
                throw new NotFoundException($values . ' not found.');
            }

            return $result;
        } catch (PDOException $e) {
            $this->db->rollBack();
            throw new PDOException($e);
        }
    }