예제 #1
0
파일: client.py 프로젝트: fnet123/zyredis
 def keys(self, pattern="*"):
     '''获取所有的key,不建议使用,codis本身也不支持
     Args:
         pattern: 正则
     Returns:
         list类型key的列表
     '''
     if self.transaction:
         return self.api.keys(pattern)
     LOG.warning("keys is not supported by codis")
예제 #2
0
파일: client.py 프로젝트: anan-lee/zyredis
 def keys(self, pattern="*"):
     '''获取所有的key,不建议使用,codis本身也不支持
     Args:
         pattern: 正则
     Returns:
         list类型key的列表
     '''
     if self.transaction:
         return self.api.keys(pattern)
     LOG.warning("keys is not supported by codis")
예제 #3
0
파일: client.py 프로젝트: fnet123/zyredis
 def __len__(self):
     """``x.__len__() <==> len(x)``"""
     if self.transaction:
         return self.api.dbsize()
     LOG.warning("dbsize is not supported by codis")
예제 #4
0
파일: client.py 프로젝트: fnet123/zyredis
 def iterkeys(self, pattern="*"):
     '''使用迭代器遍历key
     '''
     if self.transaction:
         return iter(self.keys(pattern))
     LOG.warning("keys is not supported by codis")
예제 #5
0
파일: client.py 프로젝트: fnet123/zyredis
 def clear(self):
     """清理所有的key,该命令不支持codis
     """
     if self.transaction:
         return self.api.flushdb()
     LOG.warning("flushdb is not supported by codis")
예제 #6
0
파일: client.py 프로젝트: fnet123/zyredis
 def info(self):
     """获取info信息,该命令不支持codis
     """
     if self.transaction:
         return self.api.info()
     LOG.warning("info is not supported by codis")
예제 #7
0
파일: client.py 프로젝트: fnet123/zyredis
 def dbsize(self):
     """获取dbsize数量,改命令不支持codis
     """
     if self.transaction:
         return self.api.dbsize()
     LOG.warning("dbsize is not supported by codis")
예제 #8
0
파일: client.py 프로젝트: anan-lee/zyredis
 def __len__(self):
     """``x.__len__() <==> len(x)``"""
     if self.transaction:
         return self.api.dbsize()
     LOG.warning("dbsize is not supported by codis")
예제 #9
0
파일: client.py 프로젝트: anan-lee/zyredis
 def iterkeys(self, pattern="*"):
     '''使用迭代器遍历key
     '''
     if self.transaction:
         return iter(self.keys(pattern))
     LOG.warning("keys is not supported by codis")
예제 #10
0
파일: client.py 프로젝트: anan-lee/zyredis
 def clear(self):
     """清理所有的key,该命令不支持codis
     """
     if self.transaction:
         return self.api.flushdb()
     LOG.warning("flushdb is not supported by codis")
예제 #11
0
파일: client.py 프로젝트: anan-lee/zyredis
 def info(self):
     """获取info信息,该命令不支持codis
     """
     if self.transaction:
         return self.api.info()
     LOG.warning("info is not supported by codis")
예제 #12
0
파일: client.py 프로젝트: anan-lee/zyredis
 def dbsize(self):
     """获取dbsize数量,改命令不支持codis
     """
     if self.transaction:
         return self.api.dbsize()
     LOG.warning("dbsize is not supported by codis")