示例#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
 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
 def __len__(self):
     """``x.__len__() <==> len(x)``"""
     if self.transaction:
         return self.api.dbsize()
     LOG.warning("dbsize is not supported by codis")
示例#9
0
 def iterkeys(self, pattern="*"):
     '''使用迭代器遍历key
     '''
     if self.transaction:
         return iter(self.keys(pattern))
     LOG.warning("keys is not supported by codis")
示例#10
0
 def clear(self):
     """清理所有的key,该命令不支持codis
     """
     if self.transaction:
         return self.api.flushdb()
     LOG.warning("flushdb is not supported by codis")
示例#11
0
 def info(self):
     """获取info信息,该命令不支持codis
     """
     if self.transaction:
         return self.api.info()
     LOG.warning("info is not supported by codis")
示例#12
0
 def dbsize(self):
     """获取dbsize数量,改命令不支持codis
     """
     if self.transaction:
         return self.api.dbsize()
     LOG.warning("dbsize is not supported by codis")