Sets the hash to query.

    Args:
      lookup_hash (str): name of the hash attribute to look up.

    Raises:
      ValueError: if the lookup hash is not supported.
162314
def SetLookupHash(self, lookup_hash):
    
    if lookup_hash not in self.SUPPORTED_HASHES:
      raise ValueError('Unsupported lookup hash: {0!s}'.format(lookup_hash))

    self.lookup_hash = lookup_hash
847220
def symbolize_keys(hash)
      hash = hash.to_hash
      if hash.respond_to?(:symbolize_keys)
        hash.symbolize_keys
      else
        hash.inject({}) do |new_hash, (key, value)|
          new_hash[symbolize_key(key)] = value
          new_hash
        end
      end
    end
56489
def to_input_hash
      HASH_SCHEMA.schema(
        map { |attr| [attr.name, attr.to_write_type] }.to_h
      )
    end
995518
def store_hash_configuration(self, lshash):
        
        self.mongo_object.insert_one(
            {'hash_conf_name': lshash.hash_name+'_conf',
             'hash_configuration': pickle.dumps(lshash.get_config())
             }
        )
970765
def set_hash(self, algo, digest):
        """"""
        self.algo = algo
        self.digest = digest
522914
def add_hashed_value(self, hash_value, store_key):
        
        if self._unique and hash_value in self._index:
            raise NonUnique('Hash value {} already in index'.format(hash_value))
        if store_key not in self._index[hash_value]:
            self._index[hash_value].append(store_key)
        if hash_value not in self._reverse_index[store_key]:
            self._reverse_index[store_key].append(hash_value)
770710
def _get_hash(self, name, operation, create=False):
        
        return self._get_by_type(name, operation, create, b'hash', {})
1311446
def serializable_hash
      return serializable_collection if collection?
      self.class._attributes.each_with_object({}) do |(name, option), hash|
        if _include_from_options?(name) && public_send(option[:include_method])
          hash[option[:key] || name] = _set_value(name, option)
        end
      end
    end
1345907
def set_lookup_method(xml_root, value):
    """"""
    if xml_root.tag == "testsuites":
        _set_property(xml_root, "polarion-lookup-method", value)
    elif xml_root.tag in ("testcases", "requirements"):
        _set_property(xml_root, "lookup-method", value)
    else:
        raise Dump2PolarionException(_NOT_EXPECTED_FORMAT_MSG)
963768
def init_with_hash(hash)
      @tuple = Hash.new
      hash.each do |k, v|
        raise InvalidHashTupleKey unless String === k
        @tuple[k] = v
      end
    end
1238974
def get_value_hash_txids(self, value_hash):
        
        cur = self.db.cursor()
        return namedb_get_value_hash_txids(cur, value_hash)
466862
def key_hash_algo(self, value):
        

        if value not in set(['sha1', 'sha256']):
            raise ValueError(_pretty_message(
                '''
                hash_algo must be one of "sha1", "sha256", not %s
                ''',
                repr(value)
            ))

        self._key_hash_algo = value
819810
def set(var_hash)
      var_hash.each do |variable_name, value|
        throw :MissingVariable unless @variables_hash.has_key? variable_name

        bv = @variables_hash[variable_name]
        bv.value = value
      end
    end
241838
def hash_algo(self, value):
        

        if value not in set(['sha1', 'sha256', 'sha512']):
            raise ValueError(_pretty_message(
                '''
                hash_algo must be one of "sha1", "sha256", "sha512", not %s
                ''',
                repr(value)
            ))

        self._hash_algo = value
819887
def check_hash_key(query_on, key):
    """"""
    return (
        isinstance(key, BaseCondition) and
        (key.operation == "==") and
        (key.column is query_on.hash_key)
    )
255275
def method_missing(meth, *args, &block)
      db.to_hash(:key, :value).send(meth, *args, &block)
    end
930245
def flatten_hash hash
      hash.flat_map do |key, value|
        case value
        when Hash
          value.map do |inner_key, inner_value|
            "#{key}[#{inner_key}]=#{inner_value}"
          end
        when Array
          value.map { |inner_value| "#{key}[]=#{inner_value}" }
        else
          "#{key}=#{value}"
        end
      end
    end