]>
Commit | Line | Data |
---|---|---|
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>MgetCommand: Contents</b><br> <a href="#MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a><br> <a href="#Return value">Return value</a><br> <a href="#Example">Example</a> | |
20 | </div> | |
21 | ||
22 | <h1 class="wikiname">MgetCommand</h1> | |
23 | ||
24 | <div class="summary"> | |
25 | ||
26 | </div> | |
27 | ||
28 | <div class="narrow"> | |
29 | #sidebar <a href="StringCommandsSidebar.html">StringCommandsSidebar</a><h1><a name="MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a></h1> | |
30 | <i>Time complexity: O(1) for every key</i><blockquote>Get the values of all the specified keys. If one or more keys dont existor is not of type String, a 'nil' value is returned instead of the valueof the specified key, but the operation never fails.</blockquote> | |
31 | <h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a><h2><a name="Example">Example</a></h2><pre class="codeblock python" name="code"> | |
32 | $ ./redis-cli set foo 1000 | |
33 | +OK | |
34 | $ ./redis-cli set bar 2000 | |
35 | +OK | |
36 | $ ./redis-cli mget foo bar | |
37 | 1. 1000 | |
38 | 2. 2000 | |
39 | $ ./redis-cli mget foo bar nokey | |
40 | 1. 1000 | |
41 | 2. 2000 | |
42 | 3. (nil) | |
43 | $ | |
44 | </pre> | |
45 | ||
46 | </div> | |
47 | ||
48 | </div> | |
49 | </div> | |
50 | </body> | |
51 | </html> | |
52 |