Appends AND column IN (..) expression

@param string $column
@param array|\Krystal\Db\Sql\RawBindingInterface|\Krystal\Db\Sql\RawSqlFragmentInterface $values
@param boolean $filter Whether to rely on filter
@return \Krystal\Db\Sql\Db
332069
public function andWhereIn($column, $values, $filter = false)
    {
        return $this->whereInValues(__FUNCTION__, $column, $values, $filter);
    }
41543
public function addOrWhereIn(string $column, array $values)
    {
        $this->logicOperator = " OR ";

        $this->addWhereIn($column, $values);
    }
709728
public function andWhereNotEquals($column, $value, $filter = false)
    {
        return $this->andWhere($column, '!=', $value, $filter);
    }
486615
public function getFilter($column, $filter = null)
    {
        if (null === $filter) {
            return $this->filters[$column] ?? null;
        }
        return $this->filters[$column][$filter] ?? null;
    }
194624
public function toArray(
        array $columns = [],
        $filter = null
    ): array {
        $data = [];
        foreach ($this as $key => $item) {
            $data[$key] = $item;
        }
        unset($data['_keyMap']);
        if (!empty($this->_keyMap)) {
            foreach ($this->_keyMap as $beanKey => $dataKey) {
                if (array_key_exists($beanKey, $data)) {
                    $data[$dataKey] = $data[$beanKey];
                    unset($data[$beanKey]);
                }
            }
        }

        empty($columns) || $data = array_intersect_key(
            $data,
            array_flip($columns)
        );
        if ($filter === static::FILTER_NOT_NULL) {
            return array_filter($data, function ($val) {
                return !is_null($val);
            });
        } else if ($filter === static::FILTER_NOT_EMPTY) {
            return array_filter($data, function ($val) {
                if ($val === 0 || $val === '0') {
                    return true;
                } else {
                    return !empty($val);
                }
            });
        } else if (is_callable($filter)) {
            return array_filter($data, $filter);
        }
        return $data;
    }
1347748
public function equals($column, $value, $filter = false)
    {
        return $this->compare($column, '=', $value, $filter);
    }
411268
public function whereGreaterThan($column, $value, $filter = false)
    {
        return $this->where($column, '>', $value, $filter);
    }
31976
public function whereNotIn($column, array $values)
    {
        return $this->where(function ($query) use ($column, $values) {
            $query->whereNotIn($column, $values);
        });
    }
1354736
public function whereIn($column, $in, $filter = false)
    {
        return $this->createWhereIn('WHERE', $column, $in, false, $filter);
    }
776793
public function whereIn($column, $values, $filter = false)
    {
        return $this->whereInValues(__FUNCTION__, $column, $values, $filter);
    }
185501
public function compare($column, $operator, $value, $filter = false)
    {
        if (!$this->isFilterable($filter, $value)) {
            return $this;
        }

        if ($value instanceof RawSqlFragmentInterface) {
            $value = $value->getFragment();
        }

        if ($value instanceof RawBindingInterface) {
            $value = $value->getTarget();
        }

        $this->append(sprintf(' %s %s %s ', $this->quote($column), $operator, $value));
        return $this;
    }
1098810
public function orWhereLessThanOrEquals($column, $value, $filter = false)
    {
        return $this->orWhere($column, '<=', $value, $filter);
    }
494221
public function andWhereIn($column, $in, $filter = false)
    {
        return $this->createWhereIn('AND', $column, $in, false, $filter);
    }
1071588
public function addBinding($field, $values) {
        if (!is_array($values)) {
            $values = [$values];
        }

        foreach ($values as $value) {
            if ($value instanceof Predicate) {
                $this->resolvePredicate($value);

            } else if ($value instanceof SubQuery) {
                $this->resolveSubQuery($value);

            } else {
                $this->_bindings[] = [
                    'field' => $field,
                    'value' => $value
                ];
            }
        }

        return $this;
    }
154033
public function orWhereEquals($column, $value, $filter = false)
    {
        return $this->orWhere($column, '=', $value, $filter);
    }
145939
public function in($column, array $values, $conjunction = 'AND')
    {
        return $this->addExpression(new Condition\In($column, $values, $conjunction));
    }
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);
    }