redis-server 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. data/LICENSE +38 -0
  2. data/README.md +33 -0
  3. data/bin/redis +114 -0
  4. data/redis/Makefile +5 -0
  5. data/redis/extconf.rb +3 -0
  6. data/redis/redis-2.2.11/00-RELEASENOTES +199 -0
  7. data/redis/redis-2.2.11/BUGS +1 -0
  8. data/redis/redis-2.2.11/CONTRIBUTING +13 -0
  9. data/redis/redis-2.2.11/COPYING +10 -0
  10. data/redis/redis-2.2.11/Changelog +1032 -0
  11. data/redis/redis-2.2.11/INSTALL +30 -0
  12. data/redis/redis-2.2.11/Makefile +22 -0
  13. data/redis/redis-2.2.11/README +83 -0
  14. data/redis/redis-2.2.11/TODO +4 -0
  15. data/redis/redis-2.2.11/client-libraries/README +11 -0
  16. data/redis/redis-2.2.11/deps/hiredis/COPYING +10 -0
  17. data/redis/redis-2.2.11/deps/hiredis/Makefile +115 -0
  18. data/redis/redis-2.2.11/deps/hiredis/README.md +311 -0
  19. data/redis/redis-2.2.11/deps/hiredis/TODO +2 -0
  20. data/redis/redis-2.2.11/deps/hiredis/adapters/ae.h +95 -0
  21. data/redis/redis-2.2.11/deps/hiredis/adapters/libev.h +113 -0
  22. data/redis/redis-2.2.11/deps/hiredis/adapters/libevent.h +76 -0
  23. data/redis/redis-2.2.11/deps/hiredis/async.c +321 -0
  24. data/redis/redis-2.2.11/deps/hiredis/async.h +112 -0
  25. data/redis/redis-2.2.11/deps/hiredis/example-ae.c +53 -0
  26. data/redis/redis-2.2.11/deps/hiredis/example-libev.c +47 -0
  27. data/redis/redis-2.2.11/deps/hiredis/example-libevent.c +48 -0
  28. data/redis/redis-2.2.11/deps/hiredis/example.c +67 -0
  29. data/redis/redis-2.2.11/deps/hiredis/fmacros.h +15 -0
  30. data/redis/redis-2.2.11/deps/hiredis/hiredis.c +1058 -0
  31. data/redis/redis-2.2.11/deps/hiredis/hiredis.h +170 -0
  32. data/redis/redis-2.2.11/deps/hiredis/net.c +170 -0
  33. data/redis/redis-2.2.11/deps/hiredis/net.h +43 -0
  34. data/redis/redis-2.2.11/deps/hiredis/sds.c +479 -0
  35. data/redis/redis-2.2.11/deps/hiredis/sds.h +77 -0
  36. data/redis/redis-2.2.11/deps/hiredis/test.c +479 -0
  37. data/redis/redis-2.2.11/deps/hiredis/util.h +40 -0
  38. data/redis/redis-2.2.11/deps/linenoise/Makefile +10 -0
  39. data/redis/redis-2.2.11/deps/linenoise/README.markdown +45 -0
  40. data/redis/redis-2.2.11/deps/linenoise/example.c +27 -0
  41. data/redis/redis-2.2.11/deps/linenoise/linenoise.c +609 -0
  42. data/redis/redis-2.2.11/deps/linenoise/linenoise.h +55 -0
  43. data/redis/redis-2.2.11/design-documents/REDIS-CLUSTER +214 -0
  44. data/redis/redis-2.2.11/design-documents/REDIS-CLUSTER-2 +343 -0
  45. data/redis/redis-2.2.11/doc/AppendCommand.html +48 -0
  46. data/redis/redis-2.2.11/doc/AppendOnlyFileHowto.html +41 -0
  47. data/redis/redis-2.2.11/doc/AuthCommand.html +39 -0
  48. data/redis/redis-2.2.11/doc/Benchmarks.html +129 -0
  49. data/redis/redis-2.2.11/doc/BgrewriteaofCommand.html +41 -0
  50. data/redis/redis-2.2.11/doc/BgsaveCommand.html +39 -0
  51. data/redis/redis-2.2.11/doc/BlpopCommand.html +51 -0
  52. data/redis/redis-2.2.11/doc/BrpoplpushCommand.html +39 -0
  53. data/redis/redis-2.2.11/doc/CommandReference.html +47 -0
  54. data/redis/redis-2.2.11/doc/Comparisons.html +42 -0
  55. data/redis/redis-2.2.11/doc/ConfigCommand.html +76 -0
  56. data/redis/redis-2.2.11/doc/Configuration.html +38 -0
  57. data/redis/redis-2.2.11/doc/ConnectionHandlingSidebar.html +36 -0
  58. data/redis/redis-2.2.11/doc/ControlCommandsSidebar.html +36 -0
  59. data/redis/redis-2.2.11/doc/Credits.html +38 -0
  60. data/redis/redis-2.2.11/doc/DbsizeCommand.html +38 -0
  61. data/redis/redis-2.2.11/doc/DelCommand.html +41 -0
  62. data/redis/redis-2.2.11/doc/DesignPatterns.html +37 -0
  63. data/redis/redis-2.2.11/doc/EventLibray.html +44 -0
  64. data/redis/redis-2.2.11/doc/ExistsCommand.html +42 -0
  65. data/redis/redis-2.2.11/doc/ExpireCommand.html +96 -0
  66. data/redis/redis-2.2.11/doc/FAQ.html +70 -0
  67. data/redis/redis-2.2.11/doc/Features.html +38 -0
  68. data/redis/redis-2.2.11/doc/FlushallCommand.html +39 -0
  69. data/redis/redis-2.2.11/doc/FlushdbCommand.html +39 -0
  70. data/redis/redis-2.2.11/doc/FromSqlToDataStructures.html +37 -0
  71. data/redis/redis-2.2.11/doc/GenericCommandsSidebar.html +36 -0
  72. data/redis/redis-2.2.11/doc/GetCommand.html +39 -0
  73. data/redis/redis-2.2.11/doc/GetbitCommand.html +39 -0
  74. data/redis/redis-2.2.11/doc/GetsetCommand.html +38 -0
  75. data/redis/redis-2.2.11/doc/HackingStrings.html +83 -0
  76. data/redis/redis-2.2.11/doc/HashCommandsSidebar.html +36 -0
  77. data/redis/redis-2.2.11/doc/Hashes.html +37 -0
  78. data/redis/redis-2.2.11/doc/HdelCommand.html +39 -0
  79. data/redis/redis-2.2.11/doc/HexistsCommand.html +39 -0
  80. data/redis/redis-2.2.11/doc/HgetCommand.html +39 -0
  81. data/redis/redis-2.2.11/doc/HgetallCommand.html +40 -0
  82. data/redis/redis-2.2.11/doc/HincrbyCommand.html +45 -0
  83. data/redis/redis-2.2.11/doc/HlenCommand.html +38 -0
  84. data/redis/redis-2.2.11/doc/HmgetCommand.html +40 -0
  85. data/redis/redis-2.2.11/doc/HmsetCommand.html +40 -0
  86. data/redis/redis-2.2.11/doc/HsetCommand.html +40 -0
  87. data/redis/redis-2.2.11/doc/HsetnxCommand.html +41 -0
  88. data/redis/redis-2.2.11/doc/IncrCommand.html +43 -0
  89. data/redis/redis-2.2.11/doc/InfoCommand.html +48 -0
  90. data/redis/redis-2.2.11/doc/IntroductionToRedisDataTypes.html +152 -0
  91. data/redis/redis-2.2.11/doc/KeysCommand.html +43 -0
  92. data/redis/redis-2.2.11/doc/LastsaveCommand.html +39 -0
  93. data/redis/redis-2.2.11/doc/LindexCommand.html +40 -0
  94. data/redis/redis-2.2.11/doc/ListCommandsSidebar.html +36 -0
  95. data/redis/redis-2.2.11/doc/Lists.html +42 -0
  96. data/redis/redis-2.2.11/doc/LlenCommand.html +41 -0
  97. data/redis/redis-2.2.11/doc/LpopCommand.html +41 -0
  98. data/redis/redis-2.2.11/doc/LrangeCommand.html +47 -0
  99. data/redis/redis-2.2.11/doc/LremCommand.html +41 -0
  100. data/redis/redis-2.2.11/doc/LsetCommand.html +38 -0
  101. data/redis/redis-2.2.11/doc/LtrimCommand.html +47 -0
  102. data/redis/redis-2.2.11/doc/MgetCommand.html +52 -0
  103. data/redis/redis-2.2.11/doc/MonitorCommand.html +63 -0
  104. data/redis/redis-2.2.11/doc/MoveCommand.html +42 -0
  105. data/redis/redis-2.2.11/doc/MsetCommand.html +44 -0
  106. data/redis/redis-2.2.11/doc/MultiExecCommand.html +166 -0
  107. data/redis/redis-2.2.11/doc/NonexistentCommands.html +51 -0
  108. data/redis/redis-2.2.11/doc/ObjectHashMappers.html +39 -0
  109. data/redis/redis-2.2.11/doc/Pipelining.html +36 -0
  110. data/redis/redis-2.2.11/doc/ProgrammingExamples.html +38 -0
  111. data/redis/redis-2.2.11/doc/ProtocolSpecification.html +137 -0
  112. data/redis/redis-2.2.11/doc/PublishSubscribe.html +115 -0
  113. data/redis/redis-2.2.11/doc/QuickStart.html +68 -0
  114. data/redis/redis-2.2.11/doc/QuitCommand.html +38 -0
  115. data/redis/redis-2.2.11/doc/README.html +119 -0
  116. data/redis/redis-2.2.11/doc/RandomkeyCommand.html +39 -0
  117. data/redis/redis-2.2.11/doc/Redis0100ChangeLog.html +67 -0
  118. data/redis/redis-2.2.11/doc/Redis0900ChangeLog.html +56 -0
  119. data/redis/redis-2.2.11/doc/RedisBigData.html +61 -0
  120. data/redis/redis-2.2.11/doc/RedisCLI.html +37 -0
  121. data/redis/redis-2.2.11/doc/RedisEventLibrary.html +70 -0
  122. data/redis/redis-2.2.11/doc/RedisGuides.html +37 -0
  123. data/redis/redis-2.2.11/doc/RedisInternals.html +38 -0
  124. data/redis/redis-2.2.11/doc/RedisPipelining.html +93 -0
  125. data/redis/redis-2.2.11/doc/RedisStatus.html +56 -0
  126. data/redis/redis-2.2.11/doc/Redis_1_2_0_Changelog.html +40 -0
  127. data/redis/redis-2.2.11/doc/Redis_2_0_0_Changelog.html +62 -0
  128. data/redis/redis-2.2.11/doc/Redis_2_0_Whats_new.html +59 -0
  129. data/redis/redis-2.2.11/doc/RenameCommand.html +39 -0
  130. data/redis/redis-2.2.11/doc/RenamenxCommand.html +42 -0
  131. data/redis/redis-2.2.11/doc/ReplicationHowto.html +43 -0
  132. data/redis/redis-2.2.11/doc/ReplyTypes.html +42 -0
  133. data/redis/redis-2.2.11/doc/RoadMap.html +38 -0
  134. data/redis/redis-2.2.11/doc/RpoplpushCommand.html +44 -0
  135. data/redis/redis-2.2.11/doc/RpushCommand.html +40 -0
  136. data/redis/redis-2.2.11/doc/SaddCommand.html +41 -0
  137. data/redis/redis-2.2.11/doc/SaveCommand.html +39 -0
  138. data/redis/redis-2.2.11/doc/ScardCommand.html +41 -0
  139. data/redis/redis-2.2.11/doc/SdiffCommand.html +45 -0
  140. data/redis/redis-2.2.11/doc/SdiffstoreCommand.html +38 -0
  141. data/redis/redis-2.2.11/doc/SelectCommand.html +39 -0
  142. data/redis/redis-2.2.11/doc/SetCommand.html +39 -0
  143. data/redis/redis-2.2.11/doc/SetCommandsSidebar.html +36 -0
  144. data/redis/redis-2.2.11/doc/SetbitCommand.html +45 -0
  145. data/redis/redis-2.2.11/doc/SetexCommand.html +42 -0
  146. data/redis/redis-2.2.11/doc/SetnxCommand.html +51 -0
  147. data/redis/redis-2.2.11/doc/SetrangeCommand.html +58 -0
  148. data/redis/redis-2.2.11/doc/Sets.html +36 -0
  149. data/redis/redis-2.2.11/doc/ShutdownCommand.html +39 -0
  150. data/redis/redis-2.2.11/doc/SideBar.html +36 -0
  151. data/redis/redis-2.2.11/doc/SinterCommand.html +40 -0
  152. data/redis/redis-2.2.11/doc/SinterstoreCommand.html +39 -0
  153. data/redis/redis-2.2.11/doc/SismemberCommand.html +42 -0
  154. data/redis/redis-2.2.11/doc/SlaveofCommand.html +41 -0
  155. data/redis/redis-2.2.11/doc/SmembersCommand.html +38 -0
  156. data/redis/redis-2.2.11/doc/SmoveCommand.html +44 -0
  157. data/redis/redis-2.2.11/doc/SortCommand.html +75 -0
  158. data/redis/redis-2.2.11/doc/SortedSetCommandsSidebar.html +36 -0
  159. data/redis/redis-2.2.11/doc/SortedSets.html +36 -0
  160. data/redis/redis-2.2.11/doc/Speed.html +38 -0
  161. data/redis/redis-2.2.11/doc/SponsorshipHistory.html +38 -0
  162. data/redis/redis-2.2.11/doc/SpopCommand.html +40 -0
  163. data/redis/redis-2.2.11/doc/SrandmemberCommand.html +40 -0
  164. data/redis/redis-2.2.11/doc/SremCommand.html +42 -0
  165. data/redis/redis-2.2.11/doc/StringCommandsSidebar.html +36 -0
  166. data/redis/redis-2.2.11/doc/Strings.html +37 -0
  167. data/redis/redis-2.2.11/doc/StrlenCommand.html +39 -0
  168. data/redis/redis-2.2.11/doc/SubstrCommand.html +52 -0
  169. data/redis/redis-2.2.11/doc/SunionCommand.html +40 -0
  170. data/redis/redis-2.2.11/doc/SunionstoreCommand.html +38 -0
  171. data/redis/redis-2.2.11/doc/SupportedLanguages.html +60 -0
  172. data/redis/redis-2.2.11/doc/SupportedPlatforms.html +37 -0
  173. data/redis/redis-2.2.11/doc/TemplateCommand.html +38 -0
  174. data/redis/redis-2.2.11/doc/TtlCommand.html +38 -0
  175. data/redis/redis-2.2.11/doc/TwitterAlikeExample.html +250 -0
  176. data/redis/redis-2.2.11/doc/TypeCommand.html +46 -0
  177. data/redis/redis-2.2.11/doc/UnstableSource.html +39 -0
  178. data/redis/redis-2.2.11/doc/VirtualMemorySpecification.html +156 -0
  179. data/redis/redis-2.2.11/doc/VirtualMemoryUserGuide.html +66 -0
  180. data/redis/redis-2.2.11/doc/ZaddCommand.html +43 -0
  181. data/redis/redis-2.2.11/doc/ZcardCommand.html +41 -0
  182. data/redis/redis-2.2.11/doc/ZincrbyCommand.html +42 -0
  183. data/redis/redis-2.2.11/doc/ZrangeCommand.html +42 -0
  184. data/redis/redis-2.2.11/doc/ZrangebyscoreCommand.html +77 -0
  185. data/redis/redis-2.2.11/doc/ZrankCommand.html +43 -0
  186. data/redis/redis-2.2.11/doc/ZremCommand.html +42 -0
  187. data/redis/redis-2.2.11/doc/ZremrangebyrankCommand.html +39 -0
  188. data/redis/redis-2.2.11/doc/ZremrangebyscoreCommand.html +39 -0
  189. data/redis/redis-2.2.11/doc/ZscoreCommand.html +41 -0
  190. data/redis/redis-2.2.11/doc/ZunionCommand.html +42 -0
  191. data/redis/redis-2.2.11/doc/ZunionstoreCommand.html +43 -0
  192. data/redis/redis-2.2.11/doc/index.html +43 -0
  193. data/redis/redis-2.2.11/doc/redis.png +0 -0
  194. data/redis/redis-2.2.11/doc/style.css +25 -0
  195. data/redis/redis-2.2.11/redis.conf +417 -0
  196. data/redis/redis-2.2.11/src/Makefile +177 -0
  197. data/redis/redis-2.2.11/src/adlist.c +325 -0
  198. data/redis/redis-2.2.11/src/adlist.h +92 -0
  199. data/redis/redis-2.2.11/src/ae.c +390 -0
  200. data/redis/redis-2.2.11/src/ae.h +117 -0
  201. data/redis/redis-2.2.11/src/ae_epoll.c +91 -0
  202. data/redis/redis-2.2.11/src/ae_kqueue.c +93 -0
  203. data/redis/redis-2.2.11/src/ae_select.c +72 -0
  204. data/redis/redis-2.2.11/src/anet.c +347 -0
  205. data/redis/redis-2.2.11/src/anet.h +57 -0
  206. data/redis/redis-2.2.11/src/aof.c +675 -0
  207. data/redis/redis-2.2.11/src/config.c +627 -0
  208. data/redis/redis-2.2.11/src/config.h +64 -0
  209. data/redis/redis-2.2.11/src/db.c +543 -0
  210. data/redis/redis-2.2.11/src/debug.c +314 -0
  211. data/redis/redis-2.2.11/src/dict.c +721 -0
  212. data/redis/redis-2.2.11/src/dict.h +156 -0
  213. data/redis/redis-2.2.11/src/fmacros.h +15 -0
  214. data/redis/redis-2.2.11/src/help.h +638 -0
  215. data/redis/redis-2.2.11/src/intset.c +422 -0
  216. data/redis/redis-2.2.11/src/intset.h +19 -0
  217. data/redis/redis-2.2.11/src/lzf.h +100 -0
  218. data/redis/redis-2.2.11/src/lzfP.h +159 -0
  219. data/redis/redis-2.2.11/src/lzf_c.c +295 -0
  220. data/redis/redis-2.2.11/src/lzf_d.c +150 -0
  221. data/redis/redis-2.2.11/src/mkreleasehdr.sh +9 -0
  222. data/redis/redis-2.2.11/src/multi.c +268 -0
  223. data/redis/redis-2.2.11/src/networking.c +899 -0
  224. data/redis/redis-2.2.11/src/object.c +484 -0
  225. data/redis/redis-2.2.11/src/pqsort.c +197 -0
  226. data/redis/redis-2.2.11/src/pqsort.h +15 -0
  227. data/redis/redis-2.2.11/src/pubsub.c +267 -0
  228. data/redis/redis-2.2.11/src/rdb.c +1020 -0
  229. data/redis/redis-2.2.11/src/redis-benchmark.c +530 -0
  230. data/redis/redis-2.2.11/src/redis-check-aof.c +185 -0
  231. data/redis/redis-2.2.11/src/redis-check-dump.c +681 -0
  232. data/redis/redis-2.2.11/src/redis-cli.c +773 -0
  233. data/redis/redis-2.2.11/src/redis.c +1677 -0
  234. data/redis/redis-2.2.11/src/redis.h +1022 -0
  235. data/redis/redis-2.2.11/src/release.c +13 -0
  236. data/redis/redis-2.2.11/src/replication.c +557 -0
  237. data/redis/redis-2.2.11/src/sds.c +639 -0
  238. data/redis/redis-2.2.11/src/sds.h +78 -0
  239. data/redis/redis-2.2.11/src/sha1.c +276 -0
  240. data/redis/redis-2.2.11/src/sha1.h +17 -0
  241. data/redis/redis-2.2.11/src/solarisfixes.h +22 -0
  242. data/redis/redis-2.2.11/src/sort.c +389 -0
  243. data/redis/redis-2.2.11/src/syncio.c +154 -0
  244. data/redis/redis-2.2.11/src/t_hash.c +476 -0
  245. data/redis/redis-2.2.11/src/t_list.c +986 -0
  246. data/redis/redis-2.2.11/src/t_set.c +610 -0
  247. data/redis/redis-2.2.11/src/t_string.c +438 -0
  248. data/redis/redis-2.2.11/src/t_zset.c +1084 -0
  249. data/redis/redis-2.2.11/src/testhelp.h +54 -0
  250. data/redis/redis-2.2.11/src/util.c +243 -0
  251. data/redis/redis-2.2.11/src/valgrind.sup +5 -0
  252. data/redis/redis-2.2.11/src/version.h +1 -0
  253. data/redis/redis-2.2.11/src/vm.c +1149 -0
  254. data/redis/redis-2.2.11/src/ziplist.c +1323 -0
  255. data/redis/redis-2.2.11/src/ziplist.h +15 -0
  256. data/redis/redis-2.2.11/src/zipmap.c +455 -0
  257. data/redis/redis-2.2.11/src/zipmap.h +48 -0
  258. data/redis/redis-2.2.11/src/zmalloc.c +278 -0
  259. data/redis/redis-2.2.11/src/zmalloc.h +47 -0
  260. data/redis/redis-2.2.11/tests/assets/default.conf +308 -0
  261. data/redis/redis-2.2.11/tests/integration/aof.tcl +104 -0
  262. data/redis/redis-2.2.11/tests/integration/redis-cli.tcl +208 -0
  263. data/redis/redis-2.2.11/tests/integration/replication.tcl +98 -0
  264. data/redis/redis-2.2.11/tests/support/redis.tcl +241 -0
  265. data/redis/redis-2.2.11/tests/support/server.tcl +294 -0
  266. data/redis/redis-2.2.11/tests/support/test.tcl +190 -0
  267. data/redis/redis-2.2.11/tests/support/tmpfile.tcl +15 -0
  268. data/redis/redis-2.2.11/tests/support/util.tcl +296 -0
  269. data/redis/redis-2.2.11/tests/test_helper.tcl +221 -0
  270. data/redis/redis-2.2.11/tests/unit/auth.tcl +15 -0
  271. data/redis/redis-2.2.11/tests/unit/basic.tcl +616 -0
  272. data/redis/redis-2.2.11/tests/unit/cas.tcl +135 -0
  273. data/redis/redis-2.2.11/tests/unit/expire.tcl +74 -0
  274. data/redis/redis-2.2.11/tests/unit/other.tcl +240 -0
  275. data/redis/redis-2.2.11/tests/unit/printver.tcl +6 -0
  276. data/redis/redis-2.2.11/tests/unit/protocol.tcl +62 -0
  277. data/redis/redis-2.2.11/tests/unit/pubsub.tcl +195 -0
  278. data/redis/redis-2.2.11/tests/unit/quit.tcl +40 -0
  279. data/redis/redis-2.2.11/tests/unit/sort.tcl +189 -0
  280. data/redis/redis-2.2.11/tests/unit/type/hash.tcl +300 -0
  281. data/redis/redis-2.2.11/tests/unit/type/list.tcl +819 -0
  282. data/redis/redis-2.2.11/tests/unit/type/set.tcl +334 -0
  283. data/redis/redis-2.2.11/tests/unit/type/zset.tcl +587 -0
  284. data/redis/redis-2.2.11/utils/build-static-symbols.tcl +22 -0
  285. data/redis/redis-2.2.11/utils/generate-command-help.rb +112 -0
  286. data/redis/redis-2.2.11/utils/mktarball.sh +13 -0
  287. data/redis/redis-2.2.11/utils/redis-copy.rb +78 -0
  288. data/redis/redis-2.2.11/utils/redis-sha1.rb +52 -0
  289. data/redis/redis-2.2.11/utils/redis_init_script +42 -0
  290. metadata +362 -0
@@ -0,0 +1,36 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>SortedSetCommandsSidebar: Contents</b>
20
+ </div>
21
+
22
+ <h1 class="wikiname">SortedSetCommandsSidebar</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;== Sorted Set Commands ==<br/><br/><ul><li> <a href="ZaddCommand.html">ZADD</a></li><li> <a href="ZremCommand.html">ZREM</a></li><li> <a href="ZincrbyCommand.html">ZINCRBY</a></li><li> <a href="ZrankCommand.html">ZRANK</a></li><li> <a href="ZrankCommand.html">ZREVRANK</a></li><li> <a href="ZrangeCommand.html">ZRANGE</a></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a></li><li> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a></li><li> <a href="ZrangebyscoreCommand.html">ZCOUNT</a></li><li> <a href="ZremrangebyrankCommand.html">ZREMRANGEBYRANK</a></li><li> <a href="ZremrangebyscoreCommand.html">ZREMRANGEBYSCORE</a> </li><li> <a href="ZcardCommand.html">ZCARD</a></li><li> <a href="ZscoreCommand.html">ZSCORE</a></li><li> <a href="ZunionstoreCommand.html">ZUNIONSTORE</a></li><li> <a href="ZunionstoreCommand.html">ZINTERSTORE</a></li><li> <a href="SortCommand.html">SORT</a></li></ul>
30
+ </div>
31
+
32
+ </div>
33
+ </div>
34
+ </body>
35
+ </html>
36
+
@@ -0,0 +1,36 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>SortedSets: Contents</b><br>&nbsp;&nbsp;<a href="#Redis Sorted Set Type">Redis Sorted Set Type</a><br>&nbsp;&nbsp;<a href="#Implementation details">Implementation details</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">SortedSets</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;#sidebar <a href="SortedSetCommandsSidebar.html">SortedSetCommandsSidebar</a><h1><a name="Redis Sorted Set Type">Redis Sorted Set Type</a></h1>Redis Sorted Sets are, similarly to <a href="Sets.html">Sets</a>, collections of <a href="Strings.html">Redis Strings</a>. The difference is that every member of a Sorted Set hash an <b>associated score</b> that is used in order to take this member in order.<br/><br/>The <a href="ZaddCommand.html">ZADD</a> command is used to add a new member to a Sorted Set, specifying the score of the element. Calling ZADD against a member already present in the sorted set but using a different score will update the score for the element, moving it to the right position in order to preserve ordering.<br/><br/>It's possible to get ranges of elements from Sorted Sets in a very similar way to what happens with <a href="Lists.html">Lists</a> and the <a href="LrangeCommnad.html">LRANGE</a> command using the Sorted Sets <a href="ZrangeCommand.html">ZRANGE</a> command.<br/><br/>It's also possible to get or remove ranges of elements by score using the <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a> and <a href="ZremrangebyscoreCommand.html">ZREMRANGEBYSCORE</a> commands.<br/><br/>The max number of members in a sorted set is 232-1 (4294967295, more than 4 billion of members per set).<br/><br/>Note that while Sorted Sets are already ordered, it is still possible to use the <a href="SortCommand.html">SORT</a> command against sorted sets to get the elements in a different order.<h1><a name="Implementation details">Implementation details</a></h1>Redis Sets are implemented using a dual-ported data structure containing a skip list and an hash table. When an element is added a map between the element and the score is added to the hash table (so that given the element we get the score in O(1)), and a map between the score and the element is added in the skip list so that elements are taken in order.<br/><br/>Redis uses a special skip list implementation that is doubly linked so that it's possible to traverse the sorted set from tail to head if needed (Check the <a href="ZRevrangeCommand.html">ZREVRANGE</a> command).<br/><br/>When <a href="ZaddCommand.html">ZADD</a> is used in order to update the score of an element, Redis retrieve the score of the element using the hash table, so that it's fast to access the element inside the skip list (that's indexed by score) in order to update the position.<br/><br/>Like it happens for Sets the hash table resizing is a blocking operation performed synchronously so working with huge sorted sets (consisting of many millions of elements) care should be taken when mass-inserting a very big amount of elements in a Set while other clients are querying Redis at high speed.<br/><br/>It is possible that in the near future Redis will switch to skip lists even for the element =&gt; score map, so every Sorted Set will have two skip lists, one indexed by element and one indexed by score.
30
+ </div>
31
+
32
+ </div>
33
+ </div>
34
+ </body>
35
+ </html>
36
+
@@ -0,0 +1,38 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>Speed: Contents</b><br>&nbsp;&nbsp;<a href="#Speed (ROUGH DRAFT)">Speed (ROUGH DRAFT)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#TODO">TODO</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">Speed</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+
30
+ <h1><a name="Speed (ROUGH DRAFT)">Speed (ROUGH DRAFT)</a></h1><h2><a name="TODO">TODO</a></h2><ul><li> Written in ANSI C</li><li> Pipelining</li><li> MultiBulkCommands</li><li> epoll &gt;= 1.1</li><li> Benchmarks</li></ul>
31
+ Redis takes the whole dataset in memory and <a href="Persistence.html">writes asynchronously to disk</a> in order to be very fast, you have the best of both worlds: hyper-speed and <a href="Persistence.html">persistence</a> for your data.<br/><br/>Establishing a new connection to a Redis Server is <i>simple</i> and <i>fast</i> nothing more that a TCP three way handshake. There is no authentication or other handshake involved (<a href="http://groups.google.com/group/redis-db/browse_thread/thread/1adb93f0b6a1460a" target="_blank">Google Group: Can we use connection pool in Redis?</a>) You can read more about the way Redis clients communicate with servers in the <a href="ProtocolSpecification.html">Protocol Specification</a>.<br/><br/>On most commodity hardware it takes about 45 seconds to restore a 2 GB database, without fancy RAID. This can give you some kind of feeling about the order of magnitude of the time needed to load data when you restart the server, so restarting a server is fast too.<br/><br/>Also <a href="Replication.html">Replication</a> is fast, benchamarks will give you the the same order of magnitude a restart does (<a href="http://groups.google.com/group/redis-db/browse_thread/thread/3ab1c8b2126f1b8/29bdb6c5973f0388?lnk=gst&q=replication+#29bdb6c5973f0388" target="_blank">Google Group: Replication speed benchmak</a>)
32
+ </div>
33
+
34
+ </div>
35
+ </div>
36
+ </body>
37
+ </html>
38
+
@@ -0,0 +1,38 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>SponsorshipHistory: Contents</b><br>&nbsp;&nbsp;<a href="#Redis Sponsorship History">Redis Sponsorship History</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">SponsorshipHistory</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ <h1><a name="Redis Sponsorship History">Redis Sponsorship History</a></h1><b>Important notice: since 15 March 2010 I Joined VMware that is sponsoring all my work on Redis.</b> Thank you to all the companies and people donating in the past. No further donations are accepted.<br/><br/>This is a list of companies that sponsorship Redis developments, with details about the sponsored features. <b>Thanks for helping the project!</b>.<br/><br/><ul><li> <a href="http://www.linode.com/?r=5cf1759a154c981368394fca9918970f60b6a2b3" target="_blank"><img src="http://www.linode.com/images/linode_logo10.gif" border="0"></img></a><br></br> 15 January 2010, provided Virtual Machines for Redis testing in a virtualized environment.</li><li> <a href="https://manage.slicehost.com/customers/new?referrer=d6272cc9e5f38cd2513e760e4d22bd9d" target="_blank"><img src="http://wiki.slicehost.com/lib/exe/fetch.php?w=&h=&cache=cache&media=slicehost.gif" border="0"></img></a><br></br> 14 January 2010, provided Virtual Machines for Redis testing in a virtualized environment.</li><li> <a href="http://citrusbyte.com" target="_blank"><img src="http://redis.googlecode.com/files/citrusbyte_logo.png" border="0"></img></a><br></br> 18 Dec 2009, part of Virtual Memory.</li><li> <a href="http://www.hitmeister.de/" target="_blank"><img src="http://redis.googlecode.com/files/logo_hitmeister_2.png" border="0"></img></a><br></br> 15 Dec 2009, part of Redis Cluster.</li><li> <a href="http://engineyard.com" target="_blank"><img src="http://redis.googlecode.com/files/engine_yard_logo.jpg" border="0"></img></a><br></br> 13 Dec 2009, for blocking POP (BLPOP) and part of the Virtual Memory implementation.</li></ul>
30
+ <b>Also thaks to the following people or organizations that donated to the Project:</b>
31
+ <ul><li> Emil Vladev</li><li> <a href="http://bradjasper.com/" target="_blank">Brad Jasper</a></li><li> <a href="http://www.mrkris.com/" target="_blank">Mrkris</a></li></ul>
32
+ </div>
33
+
34
+ </div>
35
+ </div>
36
+ </body>
37
+ </html>
38
+
@@ -0,0 +1,40 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>SpopCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SPOP _key_">SPOP _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">SpopCommand</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;#sidebar <a href="SetCommandsSidebar.html">SetCommandsSidebar</a><h1><a name="SPOP _key_">SPOP _key_</a></h1>
30
+ <i>Time complexity O(1)</i><blockquote>Remove a random element from a Set returning it as return value.If the Set is empty or the key does not exist, a nil object is returned.</blockquote>
31
+ <blockquote>The <a href="SrandmemberCommand.html">SRANDMEMBER</a> command does a similar work butthe returned element is not removed from the Set.</blockquote>
32
+ <h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>
33
+
34
+ </div>
35
+
36
+ </div>
37
+ </div>
38
+ </body>
39
+ </html>
40
+
@@ -0,0 +1,40 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>SrandmemberCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SRANDMEMBER _key_">SRANDMEMBER _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">SrandmemberCommand</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;#sidebar <a href="SetCommandsSidebar.html">SetCommandsSidebar</a><h1><a name="SRANDMEMBER _key_">SRANDMEMBER _key_</a></h1>
30
+ <i>Time complexity O(1)</i><blockquote>Return a random element from a Set, without removing the element. If the Set is empty or the key does not exist, a nil object is returned.</blockquote>
31
+ <blockquote>The <a href="SpopCommand.html">SPOP</a> command does a similar work but the returned elementis popped (removed) from the Set.</blockquote>
32
+ <h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>
33
+
34
+ </div>
35
+
36
+ </div>
37
+ </div>
38
+ </body>
39
+ </html>
40
+
@@ -0,0 +1,42 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>SremCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SREM _key_ _member_">SREM _key_ _member_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">SremCommand</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;#sidebar <a href="SetCommandsSidebar.html">SetCommandsSidebar</a><h1><a name="SREM _key_ _member_">SREM _key_ _member_</a></h1>
30
+ <i>Time complexity O(1)</i><blockquote>Remove the specified <i>member</i> from the set value stored at <i>key</i>. If_member_ was not a member of the set no operation is performed. If <i>key</i>does not hold a set value an error is returned.</blockquote>
31
+ <h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
32
+ 1 if the new element was removed
33
+ 0 if the new element was not a member of the set
34
+ </pre>
35
+
36
+ </div>
37
+
38
+ </div>
39
+ </div>
40
+ </body>
41
+ </html>
42
+
@@ -0,0 +1,36 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>StringCommandsSidebar: Contents</b>
20
+ </div>
21
+
22
+ <h1 class="wikiname">StringCommandsSidebar</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;== String Commands ==<br/><br/><ul><li> <a href="SetCommand.html">SET</a></li><li> <a href="GetCommand.html">GET</a></li><li> <a href="StrlenCommand.html">STRLEN</a></li><li> <a href="GetsetCommand.html">GETSET</a></li><li> <a href="SetnxCommand.html">SETNX</a></li><li> <a href="SetexCommand.html">SETEX</a></li><li> <a href="SetbitCommand.html">SETBIT</a></li><li> <a href="GetbitCommand.html">GETBIT</a></li><li> <a href="MsetCommand.html">MSET</a></li><li> <a href="MsetCommand.html">MSETNX</a></li><li> <a href="MgetCommand.html">MGET</a></li><li> <a href="IncrCommand.html">INCR</a></li><li> <a href="IncrCommand.html">INCRBY</a></li><li> <a href="IncrCommand.html">DECR</a></li><li> <a href="IncrCommand.html">DECRBY</a></li><li> <a href="AppendCommand.html">APPEND</a></li><li> <a href="SetrangeCommand.html">SETRANGE</a></li><li> <a href="SubstrCommand.html">GETRANGE (or SUBSTR)</a></li></ul>
30
+ </div>
31
+
32
+ </div>
33
+ </div>
34
+ </body>
35
+ </html>
36
+
@@ -0,0 +1,37 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>Strings: Contents</b><br>&nbsp;&nbsp;<a href="#Redis String Type">Redis String Type</a><br>&nbsp;&nbsp;<a href="#Implementation details">Implementation details</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">Strings</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;#sidebar <a href="StringCommandsSidebar.html">StringCommandsSidebar</a><h1><a name="Redis String Type">Redis String Type</a></h1>Strings are the most basic Redis kind of values. Redis Strings are binary safe, this means a Redis string can contain any kind of data, for instance a JPEG image or a serialized Ruby object, and so forth.<br/><br/>A String value can be at max 512 Megabytes in length.<br/><br/>Strings are treated as integer values by the <a href="IncrCommand.html">INCR</a> commands family, in this respect the value of an intger is limited to a singed 64 bit value.<br/><br/>Note that the single elements contained in Redis <a href="Lists.html">Lists</a>, <a href="Sets.html">Sets</a> and <a href="SortedSets.html">Sorted Sets</a>, are Redis Strings.<h1><a name="Implementation details">Implementation details</a></h1>Strings are implemented using a dynamic strings library called <code name="code" class="python">sds.c</code> (simple dynamic strings). This library caches the current length of the string, so to obtain the length of a Redis string is an O(1) operation (but currently there is no such STRLEN command. It will likely be added later).<br/><br/>Redis strings are incapsualted into Redis Objects. Redis Objects use a reference counting memory management system, so a single Redis String can be shared in different places of the dataset. This means that if you happen to use the same strings many times (especially if you have <i>object sharing</i> turned on in the configuration file) Redis will try to use the same string object instead to allocate one new every time.<br/><br/>Starting from version 1.1 Redis is also able to encode in a special way strings that are actually just numbers. Instead to save the string as an array of characters Redis will save the integer value in order to use less memory. With many datasets this can reduce the memory usage of about 30% compared to Redis 1.0.
30
+
31
+ </div>
32
+
33
+ </div>
34
+ </div>
35
+ </body>
36
+ </html>
37
+
@@ -0,0 +1,39 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>StrlenCommand: Contents</b><br>&nbsp;&nbsp;<a href="#STRLEN _key_ (Redis &gt;">STRLEN _key_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">StrlenCommand</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;#sidebar <a href="StringCommandsSidebar.html">StringCommandsSidebar</a><h1><a name="STRLEN _key_ (Redis &gt;">STRLEN _key_ (Redis &gt;</a></h1> 2.1.8) =
30
+ <i>Time complexity: O(1)</i><blockquote>Returns the length of the string stored at the specified <i>key</i>.</blockquote>
31
+ <h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically: the length of the string.
32
+
33
+ </div>
34
+
35
+ </div>
36
+ </div>
37
+ </body>
38
+ </html>
39
+
@@ -0,0 +1,52 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3
+ <html>
4
+ <head>
5
+ <link type="text/css" rel="stylesheet" href="style.css" />
6
+ </head>
7
+ <body>
8
+ <div id="page">
9
+
10
+ <div id='header'>
11
+ <a href="index.html">
12
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
13
+ </a>
14
+ </div>
15
+
16
+ <div id="pagecontent">
17
+ <div class="index">
18
+ <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19
+ <b>SubstrCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SUBSTR _key_ _start_ _end_">SUBSTR _key_ _start_ _end_</a><br>&nbsp;&nbsp;<a href="#GETRANGE _key_ _start_ _end_">GETRANGE _key_ _start_ _end_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Examples">Examples</a>
20
+ </div>
21
+
22
+ <h1 class="wikiname">SubstrCommand</h1>
23
+
24
+ <div class="summary">
25
+
26
+ </div>
27
+
28
+ <div class="narrow">
29
+ &iuml;&raquo;&iquest;#sidebar <a href="StringCommandsSidebar.html">StringCommandsSidebar</a><h1><a name="SUBSTR _key_ _start_ _end_">SUBSTR _key_ _start_ _end_</a></h1>
30
+ <h1><a name="GETRANGE _key_ _start_ _end_">GETRANGE _key_ _start_ _end_</a></h1>
31
+ <i>Time complexity: O(start+n) (with start being the start index and n the total length of the requested range). Note that the lookup part of this command is O(1) so for small strings this is actually an O(1) command.</i><b>Warning:</b> this command was renamed into GETRANGE. SUBSTR will be taken as an alias until the next major release of Redis.<br/><br/><blockquote>Return a subset of the string from offset <i>start</i> to offset <i>end</i>(both offsets are inclusive).Negative offsets can be used in order to provide an offset starting fromthe end of the string. So -1 means the last char, -2 the penultimate andso forth.</blockquote>
32
+ <blockquote>The function handles out of range requests without raising an error, butjust limiting the resulting range to the actual length of the string.</blockquote>
33
+ <h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a><h2><a name="Examples">Examples</a></h2><pre class="codeblock python" name="code">
34
+ redis&gt; set s &quot;This is a string&quot;
35
+ OK
36
+ redis&gt; substr s 0 3
37
+ &quot;This&quot;
38
+ redis&gt; substr s -3 -1
39
+ &quot;ing&quot;
40
+ redis&gt; substr s 0 -1
41
+ &quot;This is a string&quot;
42
+ redis&gt; substr s 9 100000
43
+ &quot; string&quot;
44
+ </pre>
45
+
46
+ </div>
47
+
48
+ </div>
49
+ </div>
50
+ </body>
51
+ </html>
52
+