当前位置: 首页>>代码示例>>Python>>正文


Python piedis.Response类代码示例

本文整理汇总了Python中org.cyy.fw.piedis.Response的典型用法代码示例。如果您正苦于以下问题:Python Response类的具体用法?Python Response怎么用?Python Response使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Response类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: restore

 def restore(self, key, serialValue, millTTL, replace):
     if replace :
         resp = self.sendCommand(Command.RESTORE, key, str(millTTL), serialValue, RedisKeyword.REPLACE)
         return Response.toStr(resp)
     else:
         resp = self.sendCommand(Command.RESTORE, key, str(millTTL), serialValue)
         return Response.toStr(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:7,代码来源:Client.py

示例2: scan

 def scan(self, cursor, params):
     args = (str(cursor),)
     if params != None:
         args = args + params.getParams()
     
     resp = self.sendCommand(Command.SCAN, *args)
     return Response.toScanResult(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:7,代码来源:Client.py

示例3: bitCount

 def bitCount(self, key, start, end):
     args = [key]
     if start != None:
         args.append(str(start))
         if end != None:
             args.append(str(end))
     resp = self.sendCommand(Command.BITCOUNT, *tuple(args))
     return Response.toInt(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:8,代码来源:Client.py

示例4: zUnionStore

 def zUnionStore(self, destKey, params, key, *moreKeys):
     args = (destKey,)
     numberKeys = 1 + len(moreKeys)
     args += (numberKeys, key)
     args += moreKeys
     if params != None:
         args += params.getParams()
     resp = self.sendCommand(Command.ZUNIONSTORE, *args)
     return Response.toInt(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:9,代码来源:Client.py

示例5: sort

 def sort(self, key, params, destKey):
     args = []
     args.append(key)
     if params != None:
         args += params.getParams()
     if destKey != None:
         args.append(RedisKeyword.STORE)
         args.append(destKey)
     
     resp = self.sendCommand(Command.SORT, *tuple(args))
     return Response.toTuple(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:11,代码来源:Client.py

示例6: scriptExist

 def scriptExist(self, script, *moreScripts):
     resp = self.sendCommand(Command.SCRIPT, RedisKeyword.EXISTS, script, *moreScripts)
     return Response.toTuple(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例7: objectEncoding

 def objectEncoding(self, key):
     resp = self.sendCommand(Command.OBJECT, RedisKeyword.ENCODING, key)
     return Response.toStr(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例8: renameNX

 def renameNX(self, key, newKey):
     resp = self.sendCommand(Command.RENAMENX, key, newKey)
     return Response.toInt(resp) == 1
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例9: zScan

 def zScan(self, key, cursor, scanParams):
     args = (key, cursor)
     if scanParams != None:
         args += scanParams.getParams()
     resp = self.sendCommand(Command.ZSCAN, *args)
     return Response.toScoreMemberScanResult(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:6,代码来源:Client.py

示例10: pExpireAt

 def pExpireAt(self, key, millTs):
     resp = self.sendCommand(Command.PEXPIREAT, key, str(millTs))
     return Response.toInt(resp) == 1
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例11: randomKey

 def randomKey(self):
     resp = self.sendCommand(Command.RANDOMKEY)
     return Response.toStr(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例12: quit

 def quit(self):
     resp = self.sendCommand(Command.QUIT)
     return Response.toStr(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例13: persist

 def persist(self, key):
     resp = self.sendCommand(Command.PERSIST, key)
     return Response.toInt(resp) == 1
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例14: echo

 def echo(self, message):
     resp = self.sendCommand(Command.ECHO, message)
     return Response.toStr(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py

示例15: ping

 def ping(self):
     resp = self.sendCommand(Command.PING)
     return Response.toStr(resp)
开发者ID:chenyihan,项目名称:piedis,代码行数:3,代码来源:Client.py


注:本文中的org.cyy.fw.piedis.Response类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。