@param string $key
@param string $field

@return Promise
@yield bool
426791
public function hExists($key, $field) {
        return $this->send(['hexists', $key, $field], function ($response) {
            return (bool) $response;
        });
    }
1103904
public function get($field) {
        return key_exists($field, $this->_properties) ? $this->_properties[$field] : null;
    }
452897
public function hset($key, $field, $value) {

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

        $set[$field] = $value;
        $this->set($key, $set);
    }
518790
public function get(string $key): Promise
    {
        try {
            $file = $this->cacheDir . urlencode($key);
            if (!file_exists($file)) {
                return Promise\resolve(null);
            }
            return Promise\resolve(unserialize(file_get_contents($file)));
        } catch (\Exception $e) {
            return Promise\resolve(null);
        }
    }
1015958
public function hexists($collection, $key, $field) {

        $set = $this->getKey($collection, $key, []);

        return isset($set[$field]);
    }
576
function wrap(fieldName, promise, args) {
  return promise(args).then((result) => ({
    [fieldName]: result,
  }));
}
931818
protected function wait(string $key): \Generator
    {
        if (isset($this->locks[$key])) {
            do {
                yield $this->locks[$key];
            } while (isset($this->locks[$key]));

            return true;
        }

        return false;
    }
816152
public function copyfrom($key, $fields = null) {
		$f3 = \Base::instance();
		$srcfields = is_array($key) ? $key : $f3->get($key);
		if ($fields)
			if (is_callable($fields))
				$srcfields = $fields($srcfields);
			else {
				if (is_string($fields))
					$fields = $f3->split($fields);
				$srcfields = array_intersect_key($srcfields, array_flip($fields));
			}
		foreach ($srcfields as $key => $val) {
			if (isset($this->fieldConf[$key]) && isset($this->fieldConf[$key]['type'])) {
				if ($this->fieldConf[$key]['type'] == self::DT_JSON && is_string($val))
					$val = json_decode($val);
				elseif ($this->fieldConf[$key]['type'] == self::DT_SERIALIZED && is_string($val))
					$val = unserialize($val);
			}
			$this->set($key, $val);
		}
	}
373520
public function set(string $key, $value): Promise
    {
        return $this->client->xcache->set($key, serialize($value))->otherwise(function () {
            // Ignore
        });
    }
1257464
public function hasVal($key) {
        return isset($this->field[$key]) || (is_array($this->field) && array_key_exists($key, $this->field));
    }
42823
public function addField(Field $field, Key $key = null)
    {
        if (null !== $key) {
            $field->setKey($key);
        }
        
        $this->fields[$field->getName()] = $field;

        return $this;
    }
748578
public function neq($field, $value)
    {
        return function ($object) use ($field, $value) {
            return ClosureExpressionBuilder::getObjectFieldValue($object, $field) !== $value;
        };
    }
357758
public function hSet($key, $field, $value)
    {
        $this->log(__FUNCTION__, $key);
        return $this->persistence->hSet($key, $field, $value);
    }
800332
public function alterField($name, Field $field, Key $key = null)
    {
        if (null !== $key) {
            $field->setKey($key);
        }

        $this->fields[$name] = $field;

        $this->alters[$name] = $field;

        return $this;
    }
356625
protected function load($field)
    {
        if (!is_null($this->$field)
            || !$this->delegatesCollection
            || !$this->delegatesCollection->containsKey($key = strtolower($field))
        ) {
            return $this->$field;
        }

        $loader = $this->delegatesCollection->get($key);
        $this->delegatesCollection->remove($key);

        return $this->$field = $loader($this);
    }
877660
public function hmSet($key, $fields)
    {
        if ($this->hasMaxSize()) {
            foreach ($fields as $field => $value) {
                try {
                    if ($this->isLarge($value)) {
                        $fields[$field] = $this->setLargeValue($this->getMappedKey($key, $field), $value, 0, false);
                    }
                } catch (common_Exception $e) {
                    common_Logger::w('Max size value is misconfigured: ' . $e->getMessage());
                }
            }
        }

        return $this->getDriver()->hmSet($key, $fields);
    }
597206
public function hasField($field)
    {
        $schema = static::getSchema();
        return (
            array_key_exists($field, $this->record)
            || array_key_exists($field, $this->components)
            || $schema->fieldSpec(static::class, $field)
            || $schema->unaryComponent(static::class, $field)
            || $this->hasMethod("get{$field}")
        );
    }