Esempio n. 1
0
 def get(self, key, default=None):
     logger.warn("SN GET %s", key)
     result = self.session.execute(self._prepared_select,
                                   [self._format_key(key)])
     if len(result.current_rows) == 0:
         return default
     return pickle.loads(result[0].decode('hex'))
Esempio n. 2
0
 def __getitem__(self, key):
     return pickle.loads(
         self.db_conn.get(self.domain, self._format_key(key)))
Esempio n. 3
0
 def __getitem__(self, key):
     return pickle.loads(self.db_conn.get(self.domain, self._format_key(key)))
 def __getitem__(self, key):
     try:
         result = self.cf.get(self._format_key(key))
         return pickle.loads(result['data'])
     except pycassa.NotFoundException:
         return None
 def __getitem__(self, key):
     try:
         return pickle.loads(self.db_conn[self._format_key(key)]['value'])
     except ResourceNotFound:
         return None
Esempio n. 6
0
 def __getitem__(self, key):
     result = self.session.execute(self._prepared_select,
                                   [self._format_key(key)])
     if len(result.current_rows) > 0:
         return pickle.loads(result[0].data.decode('hex'))
     raise KeyError()
 def __getitem__(self, key):
     try:
         result = self.cf.get(self._format_key(key))
         return pickle.loads(result["data"])
     except pycassa.NotFoundException:
         return None
Esempio n. 8
0
 def __getitem__(self, key):
     return pickle.loads(self.db_conn.hget(self._format_key(key), 'data'))
Esempio n. 9
0
 def __getitem__(self, key):
     try:
         return pickle.loads(self.db_conn[self._format_key(key)]["value"])
     except ResourceNotFound:
         return None