redis/doc/SmoveCommand.html

45 lines
2.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body>
<div id="page">
<div id='header'>
<a href="index.html">
<img style="border:none" alt="Redis Documentation" src="redis.png">
</a>
</div>
<div id="pagecontent">
<div class="index">
<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
<b>SmoveCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SMOVE _srckey_ _dstkey_ _member_">SMOVE _srckey_ _dstkey_ _member_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
</div>
<h1 class="wikiname">SmoveCommand</h1>
<div class="summary">
</div>
<div class="narrow">
<h1><a name="SMOVE _srckey_ _dstkey_ _member_">SMOVE _srckey_ _dstkey_ _member_</a></h1>
<i>Time complexity O(1)</i><blockquote>Move the specifided <i>member</i> from the set at <i>srckey</i> to the set at <i>dstkey</i>.This operation is atomic, in every given moment the element will appear tobe in the source or destination set for accessing clients.</blockquote>
<blockquote>If the source set does not exist or does not contain the specified elementno operation is performed and zero is returned, otherwise the element isremoved from the source set and added to the destination set. On successone is returned, even if the element was already present in the destinationset.</blockquote>
<blockquote>An error is raised if the source or destination keys contain a non Set value.</blockquote>
<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">
1 if the element was moved
0 if the element was not found on the first set and no operation was performed
</pre><h2><a name="See also">See also</a></h2>
<ul><li> <a href="SaddCommand.html">SADD</a></li><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li></ul>
</div>
</div>
</div>
</body>
</html>