MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / one

Method one

join/LSH/datasketch/storage.py:686–698  ·  view source on GitHub ↗

Select one single value of the given key. :param byte|str key: the key :rtype: byte|str|None :return: a single value for that key or None if the key does not exist

(self, key)

Source from the content-addressed store, hash-verified

684 }
685
686 def one(self, key):
687 """
688 Select one single value of the given key.
689
690 :param byte|str key: the key
691 :rtype: byte|str|None
692 :return: a single value for that key or None if the key does not exist
693 """
694 rows = self._session.execute(self._stmt_get_one, (self._key_encoder(key),))
695 if rows:
696 row = next(iter(rows))
697 return self._val_decoder(row.value)
698 return None
699
700
701 class CassandraStorage(object):

Callers 1

has_keyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected