2
0

MgetCommand.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
  2. <html>
  3. <head>
  4. <link type="text/css" rel="stylesheet" href="style.css" />
  5. </head>
  6. <body>
  7. <div id="page">
  8. <div id='header'>
  9. <a href="index.html">
  10. <img style="border:none" alt="Redis Documentation" src="redis.png">
  11. </a>
  12. </div>
  13. <div id="pagecontent">
  14. <div class="index">
  15. <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
  16. <b>MgetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Example">Example</a>
  17. </div>
  18. <h1 class="wikiname">MgetCommand</h1>
  19. <div class="summary">
  20. </div>
  21. <div class="narrow">
  22. &iuml;&raquo;&iquest;#sidebar <a href="StringCommandsSidebar.html">StringCommandsSidebar</a><h1><a name="MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a></h1>
  23. <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>
  24. <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">
  25. $ ./redis-cli set foo 1000
  26. +OK
  27. $ ./redis-cli set bar 2000
  28. +OK
  29. $ ./redis-cli mget foo bar
  30. 1. 1000
  31. 2. 2000
  32. $ ./redis-cli mget foo bar nokey
  33. 1. 1000
  34. 2. 2000
  35. 3. (nil)
  36. $
  37. </pre>
  38. </div>
  39. </div>
  40. </div>
  41. </body>
  42. </html>