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.
- data/LICENSE +38 -0
- data/README.md +33 -0
- data/bin/redis +114 -0
- data/redis/Makefile +5 -0
- data/redis/extconf.rb +3 -0
- data/redis/redis-2.2.11/00-RELEASENOTES +199 -0
- data/redis/redis-2.2.11/BUGS +1 -0
- data/redis/redis-2.2.11/CONTRIBUTING +13 -0
- data/redis/redis-2.2.11/COPYING +10 -0
- data/redis/redis-2.2.11/Changelog +1032 -0
- data/redis/redis-2.2.11/INSTALL +30 -0
- data/redis/redis-2.2.11/Makefile +22 -0
- data/redis/redis-2.2.11/README +83 -0
- data/redis/redis-2.2.11/TODO +4 -0
- data/redis/redis-2.2.11/client-libraries/README +11 -0
- data/redis/redis-2.2.11/deps/hiredis/COPYING +10 -0
- data/redis/redis-2.2.11/deps/hiredis/Makefile +115 -0
- data/redis/redis-2.2.11/deps/hiredis/README.md +311 -0
- data/redis/redis-2.2.11/deps/hiredis/TODO +2 -0
- data/redis/redis-2.2.11/deps/hiredis/adapters/ae.h +95 -0
- data/redis/redis-2.2.11/deps/hiredis/adapters/libev.h +113 -0
- data/redis/redis-2.2.11/deps/hiredis/adapters/libevent.h +76 -0
- data/redis/redis-2.2.11/deps/hiredis/async.c +321 -0
- data/redis/redis-2.2.11/deps/hiredis/async.h +112 -0
- data/redis/redis-2.2.11/deps/hiredis/example-ae.c +53 -0
- data/redis/redis-2.2.11/deps/hiredis/example-libev.c +47 -0
- data/redis/redis-2.2.11/deps/hiredis/example-libevent.c +48 -0
- data/redis/redis-2.2.11/deps/hiredis/example.c +67 -0
- data/redis/redis-2.2.11/deps/hiredis/fmacros.h +15 -0
- data/redis/redis-2.2.11/deps/hiredis/hiredis.c +1058 -0
- data/redis/redis-2.2.11/deps/hiredis/hiredis.h +170 -0
- data/redis/redis-2.2.11/deps/hiredis/net.c +170 -0
- data/redis/redis-2.2.11/deps/hiredis/net.h +43 -0
- data/redis/redis-2.2.11/deps/hiredis/sds.c +479 -0
- data/redis/redis-2.2.11/deps/hiredis/sds.h +77 -0
- data/redis/redis-2.2.11/deps/hiredis/test.c +479 -0
- data/redis/redis-2.2.11/deps/hiredis/util.h +40 -0
- data/redis/redis-2.2.11/deps/linenoise/Makefile +10 -0
- data/redis/redis-2.2.11/deps/linenoise/README.markdown +45 -0
- data/redis/redis-2.2.11/deps/linenoise/example.c +27 -0
- data/redis/redis-2.2.11/deps/linenoise/linenoise.c +609 -0
- data/redis/redis-2.2.11/deps/linenoise/linenoise.h +55 -0
- data/redis/redis-2.2.11/design-documents/REDIS-CLUSTER +214 -0
- data/redis/redis-2.2.11/design-documents/REDIS-CLUSTER-2 +343 -0
- data/redis/redis-2.2.11/doc/AppendCommand.html +48 -0
- data/redis/redis-2.2.11/doc/AppendOnlyFileHowto.html +41 -0
- data/redis/redis-2.2.11/doc/AuthCommand.html +39 -0
- data/redis/redis-2.2.11/doc/Benchmarks.html +129 -0
- data/redis/redis-2.2.11/doc/BgrewriteaofCommand.html +41 -0
- data/redis/redis-2.2.11/doc/BgsaveCommand.html +39 -0
- data/redis/redis-2.2.11/doc/BlpopCommand.html +51 -0
- data/redis/redis-2.2.11/doc/BrpoplpushCommand.html +39 -0
- data/redis/redis-2.2.11/doc/CommandReference.html +47 -0
- data/redis/redis-2.2.11/doc/Comparisons.html +42 -0
- data/redis/redis-2.2.11/doc/ConfigCommand.html +76 -0
- data/redis/redis-2.2.11/doc/Configuration.html +38 -0
- data/redis/redis-2.2.11/doc/ConnectionHandlingSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/ControlCommandsSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/Credits.html +38 -0
- data/redis/redis-2.2.11/doc/DbsizeCommand.html +38 -0
- data/redis/redis-2.2.11/doc/DelCommand.html +41 -0
- data/redis/redis-2.2.11/doc/DesignPatterns.html +37 -0
- data/redis/redis-2.2.11/doc/EventLibray.html +44 -0
- data/redis/redis-2.2.11/doc/ExistsCommand.html +42 -0
- data/redis/redis-2.2.11/doc/ExpireCommand.html +96 -0
- data/redis/redis-2.2.11/doc/FAQ.html +70 -0
- data/redis/redis-2.2.11/doc/Features.html +38 -0
- data/redis/redis-2.2.11/doc/FlushallCommand.html +39 -0
- data/redis/redis-2.2.11/doc/FlushdbCommand.html +39 -0
- data/redis/redis-2.2.11/doc/FromSqlToDataStructures.html +37 -0
- data/redis/redis-2.2.11/doc/GenericCommandsSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/GetCommand.html +39 -0
- data/redis/redis-2.2.11/doc/GetbitCommand.html +39 -0
- data/redis/redis-2.2.11/doc/GetsetCommand.html +38 -0
- data/redis/redis-2.2.11/doc/HackingStrings.html +83 -0
- data/redis/redis-2.2.11/doc/HashCommandsSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/Hashes.html +37 -0
- data/redis/redis-2.2.11/doc/HdelCommand.html +39 -0
- data/redis/redis-2.2.11/doc/HexistsCommand.html +39 -0
- data/redis/redis-2.2.11/doc/HgetCommand.html +39 -0
- data/redis/redis-2.2.11/doc/HgetallCommand.html +40 -0
- data/redis/redis-2.2.11/doc/HincrbyCommand.html +45 -0
- data/redis/redis-2.2.11/doc/HlenCommand.html +38 -0
- data/redis/redis-2.2.11/doc/HmgetCommand.html +40 -0
- data/redis/redis-2.2.11/doc/HmsetCommand.html +40 -0
- data/redis/redis-2.2.11/doc/HsetCommand.html +40 -0
- data/redis/redis-2.2.11/doc/HsetnxCommand.html +41 -0
- data/redis/redis-2.2.11/doc/IncrCommand.html +43 -0
- data/redis/redis-2.2.11/doc/InfoCommand.html +48 -0
- data/redis/redis-2.2.11/doc/IntroductionToRedisDataTypes.html +152 -0
- data/redis/redis-2.2.11/doc/KeysCommand.html +43 -0
- data/redis/redis-2.2.11/doc/LastsaveCommand.html +39 -0
- data/redis/redis-2.2.11/doc/LindexCommand.html +40 -0
- data/redis/redis-2.2.11/doc/ListCommandsSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/Lists.html +42 -0
- data/redis/redis-2.2.11/doc/LlenCommand.html +41 -0
- data/redis/redis-2.2.11/doc/LpopCommand.html +41 -0
- data/redis/redis-2.2.11/doc/LrangeCommand.html +47 -0
- data/redis/redis-2.2.11/doc/LremCommand.html +41 -0
- data/redis/redis-2.2.11/doc/LsetCommand.html +38 -0
- data/redis/redis-2.2.11/doc/LtrimCommand.html +47 -0
- data/redis/redis-2.2.11/doc/MgetCommand.html +52 -0
- data/redis/redis-2.2.11/doc/MonitorCommand.html +63 -0
- data/redis/redis-2.2.11/doc/MoveCommand.html +42 -0
- data/redis/redis-2.2.11/doc/MsetCommand.html +44 -0
- data/redis/redis-2.2.11/doc/MultiExecCommand.html +166 -0
- data/redis/redis-2.2.11/doc/NonexistentCommands.html +51 -0
- data/redis/redis-2.2.11/doc/ObjectHashMappers.html +39 -0
- data/redis/redis-2.2.11/doc/Pipelining.html +36 -0
- data/redis/redis-2.2.11/doc/ProgrammingExamples.html +38 -0
- data/redis/redis-2.2.11/doc/ProtocolSpecification.html +137 -0
- data/redis/redis-2.2.11/doc/PublishSubscribe.html +115 -0
- data/redis/redis-2.2.11/doc/QuickStart.html +68 -0
- data/redis/redis-2.2.11/doc/QuitCommand.html +38 -0
- data/redis/redis-2.2.11/doc/README.html +119 -0
- data/redis/redis-2.2.11/doc/RandomkeyCommand.html +39 -0
- data/redis/redis-2.2.11/doc/Redis0100ChangeLog.html +67 -0
- data/redis/redis-2.2.11/doc/Redis0900ChangeLog.html +56 -0
- data/redis/redis-2.2.11/doc/RedisBigData.html +61 -0
- data/redis/redis-2.2.11/doc/RedisCLI.html +37 -0
- data/redis/redis-2.2.11/doc/RedisEventLibrary.html +70 -0
- data/redis/redis-2.2.11/doc/RedisGuides.html +37 -0
- data/redis/redis-2.2.11/doc/RedisInternals.html +38 -0
- data/redis/redis-2.2.11/doc/RedisPipelining.html +93 -0
- data/redis/redis-2.2.11/doc/RedisStatus.html +56 -0
- data/redis/redis-2.2.11/doc/Redis_1_2_0_Changelog.html +40 -0
- data/redis/redis-2.2.11/doc/Redis_2_0_0_Changelog.html +62 -0
- data/redis/redis-2.2.11/doc/Redis_2_0_Whats_new.html +59 -0
- data/redis/redis-2.2.11/doc/RenameCommand.html +39 -0
- data/redis/redis-2.2.11/doc/RenamenxCommand.html +42 -0
- data/redis/redis-2.2.11/doc/ReplicationHowto.html +43 -0
- data/redis/redis-2.2.11/doc/ReplyTypes.html +42 -0
- data/redis/redis-2.2.11/doc/RoadMap.html +38 -0
- data/redis/redis-2.2.11/doc/RpoplpushCommand.html +44 -0
- data/redis/redis-2.2.11/doc/RpushCommand.html +40 -0
- data/redis/redis-2.2.11/doc/SaddCommand.html +41 -0
- data/redis/redis-2.2.11/doc/SaveCommand.html +39 -0
- data/redis/redis-2.2.11/doc/ScardCommand.html +41 -0
- data/redis/redis-2.2.11/doc/SdiffCommand.html +45 -0
- data/redis/redis-2.2.11/doc/SdiffstoreCommand.html +38 -0
- data/redis/redis-2.2.11/doc/SelectCommand.html +39 -0
- data/redis/redis-2.2.11/doc/SetCommand.html +39 -0
- data/redis/redis-2.2.11/doc/SetCommandsSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/SetbitCommand.html +45 -0
- data/redis/redis-2.2.11/doc/SetexCommand.html +42 -0
- data/redis/redis-2.2.11/doc/SetnxCommand.html +51 -0
- data/redis/redis-2.2.11/doc/SetrangeCommand.html +58 -0
- data/redis/redis-2.2.11/doc/Sets.html +36 -0
- data/redis/redis-2.2.11/doc/ShutdownCommand.html +39 -0
- data/redis/redis-2.2.11/doc/SideBar.html +36 -0
- data/redis/redis-2.2.11/doc/SinterCommand.html +40 -0
- data/redis/redis-2.2.11/doc/SinterstoreCommand.html +39 -0
- data/redis/redis-2.2.11/doc/SismemberCommand.html +42 -0
- data/redis/redis-2.2.11/doc/SlaveofCommand.html +41 -0
- data/redis/redis-2.2.11/doc/SmembersCommand.html +38 -0
- data/redis/redis-2.2.11/doc/SmoveCommand.html +44 -0
- data/redis/redis-2.2.11/doc/SortCommand.html +75 -0
- data/redis/redis-2.2.11/doc/SortedSetCommandsSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/SortedSets.html +36 -0
- data/redis/redis-2.2.11/doc/Speed.html +38 -0
- data/redis/redis-2.2.11/doc/SponsorshipHistory.html +38 -0
- data/redis/redis-2.2.11/doc/SpopCommand.html +40 -0
- data/redis/redis-2.2.11/doc/SrandmemberCommand.html +40 -0
- data/redis/redis-2.2.11/doc/SremCommand.html +42 -0
- data/redis/redis-2.2.11/doc/StringCommandsSidebar.html +36 -0
- data/redis/redis-2.2.11/doc/Strings.html +37 -0
- data/redis/redis-2.2.11/doc/StrlenCommand.html +39 -0
- data/redis/redis-2.2.11/doc/SubstrCommand.html +52 -0
- data/redis/redis-2.2.11/doc/SunionCommand.html +40 -0
- data/redis/redis-2.2.11/doc/SunionstoreCommand.html +38 -0
- data/redis/redis-2.2.11/doc/SupportedLanguages.html +60 -0
- data/redis/redis-2.2.11/doc/SupportedPlatforms.html +37 -0
- data/redis/redis-2.2.11/doc/TemplateCommand.html +38 -0
- data/redis/redis-2.2.11/doc/TtlCommand.html +38 -0
- data/redis/redis-2.2.11/doc/TwitterAlikeExample.html +250 -0
- data/redis/redis-2.2.11/doc/TypeCommand.html +46 -0
- data/redis/redis-2.2.11/doc/UnstableSource.html +39 -0
- data/redis/redis-2.2.11/doc/VirtualMemorySpecification.html +156 -0
- data/redis/redis-2.2.11/doc/VirtualMemoryUserGuide.html +66 -0
- data/redis/redis-2.2.11/doc/ZaddCommand.html +43 -0
- data/redis/redis-2.2.11/doc/ZcardCommand.html +41 -0
- data/redis/redis-2.2.11/doc/ZincrbyCommand.html +42 -0
- data/redis/redis-2.2.11/doc/ZrangeCommand.html +42 -0
- data/redis/redis-2.2.11/doc/ZrangebyscoreCommand.html +77 -0
- data/redis/redis-2.2.11/doc/ZrankCommand.html +43 -0
- data/redis/redis-2.2.11/doc/ZremCommand.html +42 -0
- data/redis/redis-2.2.11/doc/ZremrangebyrankCommand.html +39 -0
- data/redis/redis-2.2.11/doc/ZremrangebyscoreCommand.html +39 -0
- data/redis/redis-2.2.11/doc/ZscoreCommand.html +41 -0
- data/redis/redis-2.2.11/doc/ZunionCommand.html +42 -0
- data/redis/redis-2.2.11/doc/ZunionstoreCommand.html +43 -0
- data/redis/redis-2.2.11/doc/index.html +43 -0
- data/redis/redis-2.2.11/doc/redis.png +0 -0
- data/redis/redis-2.2.11/doc/style.css +25 -0
- data/redis/redis-2.2.11/redis.conf +417 -0
- data/redis/redis-2.2.11/src/Makefile +177 -0
- data/redis/redis-2.2.11/src/adlist.c +325 -0
- data/redis/redis-2.2.11/src/adlist.h +92 -0
- data/redis/redis-2.2.11/src/ae.c +390 -0
- data/redis/redis-2.2.11/src/ae.h +117 -0
- data/redis/redis-2.2.11/src/ae_epoll.c +91 -0
- data/redis/redis-2.2.11/src/ae_kqueue.c +93 -0
- data/redis/redis-2.2.11/src/ae_select.c +72 -0
- data/redis/redis-2.2.11/src/anet.c +347 -0
- data/redis/redis-2.2.11/src/anet.h +57 -0
- data/redis/redis-2.2.11/src/aof.c +675 -0
- data/redis/redis-2.2.11/src/config.c +627 -0
- data/redis/redis-2.2.11/src/config.h +64 -0
- data/redis/redis-2.2.11/src/db.c +543 -0
- data/redis/redis-2.2.11/src/debug.c +314 -0
- data/redis/redis-2.2.11/src/dict.c +721 -0
- data/redis/redis-2.2.11/src/dict.h +156 -0
- data/redis/redis-2.2.11/src/fmacros.h +15 -0
- data/redis/redis-2.2.11/src/help.h +638 -0
- data/redis/redis-2.2.11/src/intset.c +422 -0
- data/redis/redis-2.2.11/src/intset.h +19 -0
- data/redis/redis-2.2.11/src/lzf.h +100 -0
- data/redis/redis-2.2.11/src/lzfP.h +159 -0
- data/redis/redis-2.2.11/src/lzf_c.c +295 -0
- data/redis/redis-2.2.11/src/lzf_d.c +150 -0
- data/redis/redis-2.2.11/src/mkreleasehdr.sh +9 -0
- data/redis/redis-2.2.11/src/multi.c +268 -0
- data/redis/redis-2.2.11/src/networking.c +899 -0
- data/redis/redis-2.2.11/src/object.c +484 -0
- data/redis/redis-2.2.11/src/pqsort.c +197 -0
- data/redis/redis-2.2.11/src/pqsort.h +15 -0
- data/redis/redis-2.2.11/src/pubsub.c +267 -0
- data/redis/redis-2.2.11/src/rdb.c +1020 -0
- data/redis/redis-2.2.11/src/redis-benchmark.c +530 -0
- data/redis/redis-2.2.11/src/redis-check-aof.c +185 -0
- data/redis/redis-2.2.11/src/redis-check-dump.c +681 -0
- data/redis/redis-2.2.11/src/redis-cli.c +773 -0
- data/redis/redis-2.2.11/src/redis.c +1677 -0
- data/redis/redis-2.2.11/src/redis.h +1022 -0
- data/redis/redis-2.2.11/src/release.c +13 -0
- data/redis/redis-2.2.11/src/replication.c +557 -0
- data/redis/redis-2.2.11/src/sds.c +639 -0
- data/redis/redis-2.2.11/src/sds.h +78 -0
- data/redis/redis-2.2.11/src/sha1.c +276 -0
- data/redis/redis-2.2.11/src/sha1.h +17 -0
- data/redis/redis-2.2.11/src/solarisfixes.h +22 -0
- data/redis/redis-2.2.11/src/sort.c +389 -0
- data/redis/redis-2.2.11/src/syncio.c +154 -0
- data/redis/redis-2.2.11/src/t_hash.c +476 -0
- data/redis/redis-2.2.11/src/t_list.c +986 -0
- data/redis/redis-2.2.11/src/t_set.c +610 -0
- data/redis/redis-2.2.11/src/t_string.c +438 -0
- data/redis/redis-2.2.11/src/t_zset.c +1084 -0
- data/redis/redis-2.2.11/src/testhelp.h +54 -0
- data/redis/redis-2.2.11/src/util.c +243 -0
- data/redis/redis-2.2.11/src/valgrind.sup +5 -0
- data/redis/redis-2.2.11/src/version.h +1 -0
- data/redis/redis-2.2.11/src/vm.c +1149 -0
- data/redis/redis-2.2.11/src/ziplist.c +1323 -0
- data/redis/redis-2.2.11/src/ziplist.h +15 -0
- data/redis/redis-2.2.11/src/zipmap.c +455 -0
- data/redis/redis-2.2.11/src/zipmap.h +48 -0
- data/redis/redis-2.2.11/src/zmalloc.c +278 -0
- data/redis/redis-2.2.11/src/zmalloc.h +47 -0
- data/redis/redis-2.2.11/tests/assets/default.conf +308 -0
- data/redis/redis-2.2.11/tests/integration/aof.tcl +104 -0
- data/redis/redis-2.2.11/tests/integration/redis-cli.tcl +208 -0
- data/redis/redis-2.2.11/tests/integration/replication.tcl +98 -0
- data/redis/redis-2.2.11/tests/support/redis.tcl +241 -0
- data/redis/redis-2.2.11/tests/support/server.tcl +294 -0
- data/redis/redis-2.2.11/tests/support/test.tcl +190 -0
- data/redis/redis-2.2.11/tests/support/tmpfile.tcl +15 -0
- data/redis/redis-2.2.11/tests/support/util.tcl +296 -0
- data/redis/redis-2.2.11/tests/test_helper.tcl +221 -0
- data/redis/redis-2.2.11/tests/unit/auth.tcl +15 -0
- data/redis/redis-2.2.11/tests/unit/basic.tcl +616 -0
- data/redis/redis-2.2.11/tests/unit/cas.tcl +135 -0
- data/redis/redis-2.2.11/tests/unit/expire.tcl +74 -0
- data/redis/redis-2.2.11/tests/unit/other.tcl +240 -0
- data/redis/redis-2.2.11/tests/unit/printver.tcl +6 -0
- data/redis/redis-2.2.11/tests/unit/protocol.tcl +62 -0
- data/redis/redis-2.2.11/tests/unit/pubsub.tcl +195 -0
- data/redis/redis-2.2.11/tests/unit/quit.tcl +40 -0
- data/redis/redis-2.2.11/tests/unit/sort.tcl +189 -0
- data/redis/redis-2.2.11/tests/unit/type/hash.tcl +300 -0
- data/redis/redis-2.2.11/tests/unit/type/list.tcl +819 -0
- data/redis/redis-2.2.11/tests/unit/type/set.tcl +334 -0
- data/redis/redis-2.2.11/tests/unit/type/zset.tcl +587 -0
- data/redis/redis-2.2.11/utils/build-static-symbols.tcl +22 -0
- data/redis/redis-2.2.11/utils/generate-command-help.rb +112 -0
- data/redis/redis-2.2.11/utils/mktarball.sh +13 -0
- data/redis/redis-2.2.11/utils/redis-copy.rb +78 -0
- data/redis/redis-2.2.11/utils/redis-sha1.rb +52 -0
- data/redis/redis-2.2.11/utils/redis_init_script +42 -0
- metadata +362 -0
@@ -0,0 +1,83 @@
|
|
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>HackingStrings: Contents</b><br> <a href="#Hacking Strings">Hacking Strings</a><br> <a href="#Creating Redis Strings">Creating Redis Strings</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HackingStrings</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
|
30
|
+
<h1><a name="Hacking Strings">Hacking Strings</a></h1>The implementation of Redis strings is contained in <b></b>sds.c<b></b> ( sds stands for Simple Dynamic Strings ).<br/><br/>The C structure <i>sdshdr</i> declared in <b>sds.h</b> represents a Redis string:<br/><br/><pre class="codeblock python" name="code">
|
31
|
+
struct sdshdr {
|
32
|
+
long len;
|
33
|
+
long free;
|
34
|
+
char buf[];
|
35
|
+
};
|
36
|
+
</pre>The <i>buf</i> character array stores the actual string.<br/><br/>The <i>len</i> field stores the length of <i>buf</i>. This makes obtaining the length
|
37
|
+
of a Redis string an O(1) operation.<br/><br/>The <i>free</i> field stores the number of additional bytes available for use.<br/><br/>Together the <i>len</i> and <i>free</i> field can be thought of as holding the metadata of the
|
38
|
+
<i>buf</i> character array.<h2><a name="Creating Redis Strings">Creating Redis Strings</a></h2>A new data type named <code name="code" class="python">sds</code> is defined in <b>sds.h</b> to be a synonymn for a character pointer:<br/><br/><pre class="codeblock python python" name="code">
|
39
|
+
typedef char *sds;
|
40
|
+
</pre><code name="code" class="python">sdsnewlen</code> function defined in <b>sds.c</b> creates a new Redis String: <br/><br/><pre class="codeblock python python python" name="code">
|
41
|
+
sds sdsnewlen(const void *init, size_t initlen) {
|
42
|
+
struct sdshdr *sh;
|
43
|
+
|
44
|
+
sh = zmalloc(sizeof(struct sdshdr)+initlen+1);
|
45
|
+
#ifdef SDS_ABORT_ON_OOM
|
46
|
+
if (sh == NULL) sdsOomAbort();
|
47
|
+
#else
|
48
|
+
if (sh == NULL) return NULL;
|
49
|
+
#endif
|
50
|
+
sh->len = initlen;
|
51
|
+
sh->free = 0;
|
52
|
+
if (initlen) {
|
53
|
+
if (init) memcpy(sh->buf, init, initlen);
|
54
|
+
else memset(sh->buf,0,initlen);
|
55
|
+
}
|
56
|
+
sh->buf[initlen] = '\0';
|
57
|
+
return (char*)sh->buf;
|
58
|
+
}
|
59
|
+
</pre>Remember a Redis string is a variable of type <code name="code" class="python">struct sdshdr</code>. But <code name="code" class="python">sdsnewlen</code> returns a character pointer!!<br/><br/>That's a trick and needs some explanation.<br/><br/>Suppose I create a Redis string using <code name="code" class="python">sdsnewlen</code> like below:<br/><br/><pre class="codeblock python python python python" name="code">
|
60
|
+
sdsnewlen("redis", 5);
|
61
|
+
</pre>This creates a new variable of type <code name="code" class="python">struct sdshdr</code> allocating memory for <i>len</i> and <i>free</i>
|
62
|
+
fields as well as for the <i>buf</i> character array.<br/><br/><pre class="codeblock python python python python python" name="code">
|
63
|
+
sh = zmalloc(sizeof(struct sdshdr)+initlen+1); // initlen is length of init argument.
|
64
|
+
</pre>After <code name="code" class="python">sdsnewlen</code> succesfully creates a Redis string the result is something like:<br/><br/><pre class="codeblock python python python python python python" name="code">
|
65
|
+
-----------
|
66
|
+
|5|0|redis|
|
67
|
+
-----------
|
68
|
+
^ ^
|
69
|
+
sh sh->buf
|
70
|
+
</pre><code name="code" class="python">sdsnewlen</code> returns sh->buf to the caller.<br/><br/>What do you do if you need to free the Redis string pointed by <code name="code" class="python">sh</code>?<br/><br/>You want the pointer <code name="code" class="python">sh</code> but you only have the pointer <code name="code" class="python">sh->buf</code>.<br/><br/>Can you get the pointer <code name="code" class="python">sh</code> from <code name="code" class="python">sh->buf</code>?<br/><br/>Yes. Pointer arithmetic. Notice from the above ASCII art that if you subtract
|
71
|
+
the size of two longs from <code name="code" class="python">sh->buf</code> you get the pointer <code name="code" class="python">sh</code>. <br/><br/>The sizeof two longs happens to be the size of <code name="code" class="python">struct sdshdr</code>.<br/><br/>Look at <code name="code" class="python">sdslen</code> function and see this trick at work:<br/><br/><pre class="codeblock python python python python python python python" name="code">
|
72
|
+
size_t sdslen(const sds s) {
|
73
|
+
struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
|
74
|
+
return sh->len;
|
75
|
+
}
|
76
|
+
</pre>Knowing this trick you could easily go through the rest of the functions in <b>sds.c</b>.<br/><br/>The Redis string implementation is hidden behind an interface that accepts only character pointers. The users of Redis strings need not care about how its implemented and treat Redis strings as a character pointer.
|
77
|
+
</div>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
</body>
|
82
|
+
</html>
|
83
|
+
|
@@ -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>HashCommandsSidebar: Contents</b>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HashCommandsSidebar</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
== Hash Commands ==<br/><br/><ul><li> <a href="HsetCommand.html">HSET</a></li><li> <a href="HgetCommand.html">HGET</a></li><li> <a href="HsetnxCommand.html">HSETNX</a></li><li> <a href="HmsetCommand.html">HMSET</a></li><li> <a href="HmgetCommand.html">HMGET</a></li><li> <a href="HincrbyCommand.html">HINCRBY</a></li><li> <a href="HexistsCommand.html">HEXISTS</a></li><li> <a href="HdelCommand.html">HDEL</a></li><li> <a href="HlenCommand.html">HLEN</a></li><li> <a href="HgetallCommand.html">HKEYS</a></li><li> <a href="HgetallCommand.html">HVALS</a></li><li> <a href="HgetallCommand.html">HGETALL</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>Hashes: Contents</b><br> <a href="#Redis Hash Type">Redis Hash Type</a><br> <a href="#Implementation details">Implementation details</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">Hashes</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
#sidebar <a href="HashCommandsSidebar.html">HashCommandsSidebar</a><h1><a name="Redis Hash Type">Redis Hash Type</a></h1>Redis Hashes are unordered maps of <a href="String.html">Redis Strings</a> between fields and values. It is possible to add, remove, test for existence of fields in O(1) amortized time. It is also possible to enumerate all the keys, values, or both, in O(N) (where N is the number of fields inside the hash).<br/><br/>Redis Hashes are interesting because they are very well suited to represent objects. For instance web applications users can be represented by a Redis Hash containing fields such username, encrpypted_password, lastlogin, and so forth.<br/><br/>Another very important property of Redis Hashes is that they use very little memory for hashes composed of a small number of fields (configurable, check redis.conf for details), compared to storing every field as a top level Redis key. This is obtained using a different specialized representation for small hashes. See the implementation details paragraph below for more information.<br/><br/>Commands operating on hashes try to make a good use of the return value in order to signal the application about previous existence of fields. For instance the <a href="HsetCommand.html">HSET</a> command will return 1 if the field set was not already present in the hash, otherwise will return 0 (and the user knows this was just an update operation).<br/><br/>The max number of fields in a set is 232-1 (4294967295, more than 4 billion of members per hash).<h1><a name="Implementation details">Implementation details</a></h1>The obvious internal representation of hashes is indeed an hash table, as the name of the data structure itself suggests. Still the drawback of this representation is that there is a lot of space overhead for hash table metadata.<br/><br/>Because one of the most interesting uses of Hashes is object encoding, and objects are often composed of a few fields each, Redis uses a different internal representation for small hashes (for Redis to consider a hash small, this must be composed a limited number of fields, and each field and value can't exceed a given number of bytes. All this is user-configurable).<br/><br/>Small hashes are thus encoded using a data structure called zipmap (is not something you can find in a CS book, the name is a Redis invention), that is a very memory efficient data structure to represent string to string maps, at the cost of being O(N) instead of O(1) for most operations. Since the constant times of this data structure are very small, and the zipmaps are converted into real hash tables once they are big enough, the amortized time of Redis hashes is still O(1), and in the practice small zipmaps are not slower than small hash tables because they are designed for good cache locality and fast access.<br/><br/>The result is that small hashes are both memory efficient and fast, while bigger hashes are fast but not as memory efficient than small hashes.
|
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>HdelCommand: Contents</b><br> <a href="#HDEL _key_ _field_ (Redis >">HDEL _key_ _field_ (Redis ></a><br> <a href="#Return value">Return value</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HdelCommand</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
#sidebar <a href="HashCommandsSidebar.html">HashCommandsSidebar</a><h1><a name="HDEL _key_ _field_ (Redis >">HDEL _key_ _field_ (Redis ></a></h1> 1.3.10)=
|
30
|
+
<i>Time complexity: O(1)</i><blockquote>Remove the specified <i>field</i> from an hash stored at <i>key</i>.</blockquote>
|
31
|
+
<blockquote>If the <i>field</i> was present in the hash it is deleted and 1 is returned, otherwise 0 is returned and no operation is performed.</blockquote>
|
32
|
+
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</body>
|
38
|
+
</html>
|
39
|
+
|
@@ -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>HexistsCommand: Contents</b><br> <a href="#HEXISTS _key_ _field_ (Redis >">HEXISTS _key_ _field_ (Redis ></a><br> <a href="#Return value">Return value</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HexistsCommand</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
#sidebar <a href="HashCommandsSidebar.html">HashCommandsSidebar</a><h1><a name="HEXISTS _key_ _field_ (Redis >">HEXISTS _key_ _field_ (Redis ></a></h1> 1.3.10)=
|
30
|
+
<i>Time complexity: O(1)</i><blockquote>Return 1 if the hash stored at <i>key</i> contains the specified <i>field</i>.</blockquote>
|
31
|
+
<blockquote>Return 0 if the <i>key</i> is not found or the <i>field</i> is not present.</blockquote>
|
32
|
+
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</body>
|
38
|
+
</html>
|
39
|
+
|
@@ -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>HgetCommand: Contents</b><br> <a href="#HGET _key_ _field_ (Redis >">HGET _key_ _field_ (Redis ></a><br> <a href="#Return value">Return value</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HgetCommand</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
#sidebar <a href="HashCommandsSidebar.html">HashCommandsSidebar</a><h1><a name="HGET _key_ _field_ (Redis >">HGET _key_ _field_ (Redis ></a></h1> 1.3.10)=
|
30
|
+
<i>Time complexity: O(1)</i><blockquote>If <i>key</i> holds a hash, retrieve the value associated to the specified <i>field</i>.</blockquote>
|
31
|
+
<blockquote>If the <i>field</i> is not found or the <i>key</i> does not exist, a special 'nil' value is returned.</blockquote>
|
32
|
+
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</body>
|
38
|
+
</html>
|
39
|
+
|
@@ -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>HgetallCommand: Contents</b><br> <a href="#HKEYS _key_ (Redis >">HKEYS _key_ (Redis ></a><br> <a href="#HVALS _key_ (Redis >">HVALS _key_ (Redis ></a><br> <a href="#HGETALL _key_ (Redis >">HGETALL _key_ (Redis ></a><br> <a href="#Return value">Return value</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HgetallCommand</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
#sidebar <a href="HashCommandsSidebar.html">HashCommandsSidebar</a><h1><a name="HKEYS _key_ (Redis >">HKEYS _key_ (Redis ></a></h1> 1.3.10)=
|
30
|
+
<h1><a name="HVALS _key_ (Redis >">HVALS _key_ (Redis ></a></h1> 1.3.10)=
|
31
|
+
<h1><a name="HGETALL _key_ (Redis >">HGETALL _key_ (Redis ></a></h1> 1.3.10)=
|
32
|
+
<i>Time complexity: O(N), where N is the total number of fields in the hash</i><blockquote>HKEYS returns all the fields names contained into a hash, HVALS all the associated values, while HGETALL returns both the fields and values in the form of <i>field1</i>, <i>value1</i>, <i>field2</i>, <i>value2</i>, ..., <i>fieldN</i>, <i>valueN</i>.</blockquote>
|
33
|
+
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi Bulk Reply</a>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</body>
|
39
|
+
</html>
|
40
|
+
|
@@ -0,0 +1,45 @@
|
|
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>HincrbyCommand: Contents</b><br> <a href="#HINCRBY _key_ _field_ _value_ (Redis >">HINCRBY _key_ _field_ _value_ (Redis ></a><br> <a href="#Examples">Examples</a><br> <a href="#Return value">Return value</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HincrbyCommand</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
|
30
|
+
<h1><a name="HINCRBY _key_ _field_ _value_ (Redis >">HINCRBY _key_ _field_ _value_ (Redis ></a></h1> 1.3.10)=
|
31
|
+
<i>Time complexity: O(1)</i><blockquote>Increment the number stored at <i>field</i> in the hash at <i>key</i> by <i>value</i>. If <i>key</i> does not exist, a new key holding a hash is created. If <i>field</i> does not exist or holds a string, the value is set to 0 before applying the operation.</blockquote>
|
32
|
+
<blockquote>The range of values supported by HINCRBY is limited to 64 bit signed integers.</blockquote><h2><a name="Examples">Examples</a></h2>
|
33
|
+
Since the <i>value</i> argument is signed you can use this command to perform both increments and decrements:<br/><br/><pre class="codeblock python" name="code">
|
34
|
+
HINCRBY key field 1 (increment by one)
|
35
|
+
HINCRBY key field -1 (decrement by one, just like the DECR command)
|
36
|
+
HINCRBY key field -10 (decrement by 10)
|
37
|
+
</pre>
|
38
|
+
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a> The new value at <i>field</i> after the increment operation.
|
39
|
+
</div>
|
40
|
+
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</body>
|
44
|
+
</html>
|
45
|
+
|
@@ -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>HlenCommand: Contents</b><br> <a href="#HLEN _key_ (Redis >">HLEN _key_ (Redis ></a><br> <a href="#Return value">Return value</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HlenCommand</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
#sidebar <a href="HashCommandsSidebar.html">HashCommandsSidebar</a><h1><a name="HLEN _key_ (Redis >">HLEN _key_ (Redis ></a></h1> 1.3.10)=
|
30
|
+
<i>Time complexity: O(1)</i><blockquote>Return the number of entries (fields) contained in the hash stored at <i>key</i>. If the specified <i>key</i> does not exist, 0 is returned assuming an empty hash. </blockquote>
|
31
|
+
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>
|
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>HmgetCommand: Contents</b><br> <a href="#HMGET _key_ _field1_ ... _fieldN_ (Redis >">HMGET _key_ _field1_ ... _fieldN_ (Redis ></a><br> <a href="#Return value">Return value</a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<h1 class="wikiname">HmgetCommand</h1>
|
23
|
+
|
24
|
+
<div class="summary">
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="narrow">
|
29
|
+
#sidebar <a href="HashCommandsSidebar.html">HashCommandsSidebar</a><h1><a name="HMGET _key_ _field1_ ... _fieldN_ (Redis >">HMGET _key_ _field1_ ... _fieldN_ (Redis ></a></h1> 1.3.10) =
|
30
|
+
<i>Time complexity: O(N) (with N being the number of fields)</i><blockquote>Retrieve the values associated to the specified <i>fields</i>.</blockquote>
|
31
|
+
<blockquote>If some of the specified <i>fields</i> do not exist, nil values are returned.Non existing keys are considered like empty hashes.</blockquote>
|
32
|
+
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi Bulk Reply</a> specifically a list of all the values associated with the specified fields, in the same order of the request.
|
33
|
+
|
34
|
+
</div>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</body>
|
39
|
+
</html>
|
40
|
+
|