@param $field
@param array $values
@param array $columns

@return mixed
507399
public function findWhereNotIn($field, array $values, $columns = ['*'])
    {
        return parent::findWhereNotIn(
            $this->getColumnName($field),
            $values,
            $this->getColumnsNames($columns)
        );
    }
874914
public function in($field, array $values)
    {
        return function ($object) use ($field, $values) {
            return in_array(ClosureExpressionBuilder::getObjectFieldValue($object, $field), $values);
        };
    }
775068
public function whereIn($field, $values)
    {
        $list = array_map(function ($value) {
            return compact('value');
        }, $values);

        $this->condition[] = [
            'field' => compact('field'),
            'op' => '=',
            'value' => compact('list')
        ];

        return $this;
    }
825571
protected function prepareFields($fields, $values) {
        $_fields = [];
        foreach ($fields as $field) {
            if ($field instanceof Query) { // sub-select SQL as field
                $field->setDialect($this->dialect);
                $field->setBindValues($values);
                $as = $field->getAlias();
                if ($as) {
                    $_fields [] = '(' . $field . ') AS ' . $this->sanitize('`' . $as . '`');
                }
            } else if ($field instanceof ImmutableValue) {
                $_fields [] = $field->__toString();
            } else { // this is simple field
                $_fields [] = $this->sanitize($field);
            }
        }
        if ($_fields) {
            return implode(',', $_fields);
        } else {
            return false;
        }
    }
199741
public function getByField($field, $value = null, $columns = ['*'])
    {
        return $this->simpleWrap(Action::READ, [$this, '_getByField']);
    }
1060609
public function addAllToSet(string $field, array $values)
    {
        $this->update()->addToSet($field, ['$each' => $values]);

        return $this;
    }
821048
public function setFields(array $fields,array $values)
        {
                $count = count($fields);
                if($count!=count($values)) {
                        throw new \Exception('fields num != values num');
                }
                $params = [];
                for ($i=0; $i<$count; $i++) {
                        $params[] = $fields[$i];
                        $params[] = $values[$i];
                }
                return $this->_redis->hmset($this->_key, $params);
        }
952155
public function findWhereNotIn($field, array $values, $columns = ['*'])
    {
        $this->applyCriteria();
        $this->applyScope();
        $model = $this->model->whereNotIn($field, $values)->get($columns);
        $this->resetModel();

        return $this->parserResult($model);
    }
868756
function values(array $values)
    {
        $cols = array();
        $vals = array();

        foreach ($values as $col => $val) {
            if (null !== $val) {
                $cols[] = $col;
                $vals[] = $val;
            }
        }

        foreach ($cols as &$col) {
            $this->nodes->columns[] = new UnqualifiedColumn($col);
        }

        $this->nodes->values = array_merge($this->nodes->values, $vals);
        return $this;
    }
8095
protected function buildIn($field, array $values, $isIn)
    {
        $operator = $isIn ? ' IN ' : ' NOT IN ';

        return $field.$operator.$this->parameterizeValues($values);
    }
299333
public function values($fields = [])
    {
        $this->values = [];

        if (empty($fields)) {
            foreach ($this->model->fields() as $field) {
                $this->assignValue($field);
            }

            return $this;
        }

        foreach ($fields as $field) {
            $this->assignValue($this->model->field($field));
        }

        return $this;
    }
299597
protected static function validateDisplayColumns(array $data, array $fields): array
    {
        foreach ($data as $k => $v) {
            if (in_array($v, $fields)) {
                continue;
            }
            unset($data[$k]);
        }

        return $data;
    }
222470
public function normalizeValues($field, $values)
    {
        if (!$this->_types) {
            return $values;
        }

        $type = $this->_types[$field];

        $map = ['int' => 'intval', 'float' => 'floatval', 'string' => 'strval', 'bool' => 'boolval'];
        if (isset($map[$type])) {
            $values = array_map($map[$type], $values);
        } else {
            foreach ($values as $k => $value) {
                $values[$k] = $this->normalizeValue($field, $value);
            }
        }

        return $values;
    }
978377
public function populateColumns($columns = [])
	{
		$_columns = [];
		foreach ($columns as $key => $value)
		{
			if (is_string($value))
			{
				$value_log = explode(':', $value);
				$_columns[$key] = ['attribute' => $value_log[0]];

				if (isset($value_log[1]) && $value_log[1] !== null) {
					$_columns[$key]['format'] = $value_log[1];
				}

				if (isset($value_log[2]) && $value_log[2] !== null) {
					$_columns[$key]['header'] = $value_log[2];
				}
			} elseif (is_array($value)) {
				if (!isset($value['attribute']) && !isset($value['value'])) {
					throw new \InvalidArgumentException('Attribute or Value must be defined.');
				}
				$_columns[$key] = $value;
			}
		}

		return $_columns;
	}
137969
public function notIn($field, array $values)
    {
        return function ($object) use ($field, $values) {
            return !in_array(ClosureExpressionBuilder::getObjectFieldValue($object, $field), $values);
        };
    }
830316
public function values($field)
    {
        $values = [];
        foreach ($this->queries as $query) {
            $t = $query->values($field);
            /** @noinspection SlowArrayOperationsInLoopInspection */
            $values = array_merge($values, $t);
        }

        return array_values(array_unique($values, SORT_REGULAR));
    }
110319
public function orderField($field, array $values = [], $order = '')
    {
        if (!empty($values)) {
            $values['sort'] = $order;

            $this->options['order'][$field] = $values;
        }

        return $this;
    }