仅当key不存在时写入
@param string $field
@param string $value
@return mixed
328443
public function noExistsInsert(string $field, string $value)
        {
	        return $this->_redis->hsetnx($this->_key, $field, $value);
        }
294543
public function lookAt($value, $field)
    {
        $this->value = $value;
        $this->field = $field;
        return $this;

    }
1073803
public function findByField($field, $value = null, $columns = ['*'])
    {
        if (!$this->allowedCache('findByField') || $this->isSkippedCache()) {
            return parent::findByField($field, $value, $columns);
        }

        $key = $this->getCacheKey('findByField', func_get_args());
        $minutes = $this->getCacheMinutes();
        $value = $this->getCacheRepository()->remember($key, $minutes, function () use ($field, $value, $columns) {
            return parent::findByField($field, $value, $columns);
        });

        $this->resetModel();
        $this->resetScope();
        return $value;
    }
238300
function get_by($field, $value)
	{
		$q = \Fw\Db::prepare("select * from " . $this->_table . " where " . $field . "=?");
		$q->execute(array($value));
		return $q->fetchAll(\PDO::FETCH_CLASS, $this->_entity);
	}
146820
public function contains($field, $value)
    {
        return function ($object) use ($field, $value) {
            return false !== strpos(ClosureExpressionBuilder::getObjectFieldValue($object, $field), $value);
        };
    }
1017516
private function getKey($value) {
        return !empty($this->hash) ? call_user_func($this->hash, $value) : preg_replace('/[^0-9a-z\.\_\-]/i', '', $value);
    }
1262743
public function getValue($field)
  {
    $v = $this->getValues();

    return isset($v[$field]) ? $v[$field] : false;
  }
107179
public function oneByIntOrFail(string $field, int $value): Model
    {
        return $this->oneByOrFail($field, $value);
    }
306776
protected function updateSetting($field, $value)
    {
        $value = is_array($value) ? json_encode($value) : $value;

        return $this->getTableObject()
            ->where('id', $field)
            ->update(['value' => $value]);
    }
1335807
private function getFieldValue($field)
    {
        return isset($this->values[$field]) ? $this->values[$field] : null;
    }
1262405
public function by($field, $value)
    {
        $filtered = $this->filter(function($fieldset) use($field, $value) {
            if (isset($fieldset->{$field}) and $fieldset->{$field} == $value) {
                return true;
            }
            return false;
        });
        return $filtered->isEmpty() ? null : ($filtered->count() > 1 ? $filtered : $filtered->first());
    }
748578
public function neq($field, $value)
    {
        return function ($object) use ($field, $value) {
            return ClosureExpressionBuilder::getObjectFieldValue($object, $field) !== $value;
        };
    }
146662
public function whereEq($field, $value)
    {
        $bind_key = strpos($field, '.') !== false ? strtr($field, '.', '_') : $field;
        $normalizedField = preg_replace('#\w+#', '[\\0]', $field);
        $this->_conditions[] = "$normalizedField=:$bind_key";
        $this->_bind[$bind_key] = $value;

        return $this;
    }
452897
public function hset($key, $field, $value) {

        $set = $this->get($key, array());

        $set[$field] = $value;
        $this->set($key, $set);
    }
64544
public function addValue($field, $value) {
        $rfield = str_replace(['`', '"'], '', $field);
        $field  = Condition::safeField($field);
        $index  = isset ($this->names [ $field ]) ? $this->names [ $field ] : 0;
        $key    = ':' . $field . '_' . $index;
        if (is_string($value)) {//for bigint
            $type = \PDO::PARAM_STR;
        } else if (is_numeric($value)) {// for int float
            $type = \PDO::PARAM_INT;
        } else if (is_bool($value)) {
            $type  = \PDO::PARAM_INT;
            $value = intval($value);
        } else if (is_null($value)) {
            $type = \PDO::PARAM_NULL;
        } else {
            $type = \PDO::PARAM_STR;
        }
        $this->values []        = [$key, $value, $type, $field, $rfield];
        $this->names [ $field ] = ++$index;

        return $key;
    }
1080614
public function data($field, $value = null)
    {
        if (is_null($value)) {
            return in_array($field, $this->getFillable()) ? $this->$field : $this->meta[$field];
        }

        if (in_array($field, $this->getFillable())) {
            $this->$field = $value;

            return $this->save();
        }

        return $this->setMeta($field, $value);
    }
1050958
protected function getFieldValue(string $field, string $value): array
    {
        return [
            'type' => $this->searchFields[$field]['type'],
            'operator' => key($this->searchFields[$field]['operators']),
            'value' => $value
        ];
    }