Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 10008

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>If this query should fetch partial results from mongos if a shard is down</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongocursor.next.html">MongoCursor::next</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongocursor.reset.html">MongoCursor::reset</a></div>
 <div class="up"><a href="class.mongocursor.html">MongoCursor</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mongocursor.partial" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoCursor::partial</h1>
  <p class="verinfo">(PECL mongo &gt;=1.2.0)</p><p class="refpurpose"><span class="refname">MongoCursor::partial</span> &mdash; <span class="dc-title">If this query should fetch partial results from <em class="emphasis">mongos</em> if a shard is down</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongocursor.partial-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type"><a href="class.mongocursor.html" class="type MongoCursor">MongoCursor</a></span> <span class="methodname"><strong>MongoCursor::partial</strong></span>
    ([ <span class="methodparam"><span class="type">bool</span> <code class="parameter">$okay</code><span class="initializer"> = <strong><code>TRUE</code></strong></span></span>
  ] )</div>

  <p class="para rdfs-comment">
   This option allows <em class="emphasis">mongos</em> to send partial query results 
   if a shard is unreachable.  This is only applicable when running a sharded 
   MongoDB cluster and connecting to a <em class="emphasis">mongos</em>.
  </p>
  <p class="para">
   If a shard goes down and a query needs to be sent to that shard, 
   <em class="emphasis">mongos</em> will return the results (if any) from shards it
   already contacted, then an error message that it could not reach the shard
   (a <a href="class.mongocursorexception.html" class="classname">MongoCursorException</a> in PHP).  If you would like to
   get whatever results <em class="emphasis">mongos</em> can provide and no 
   exception, you can use this method.  Note that this means that you won&#039;t have
   an indication that a shard is down in your query response.
  </p>
  <p class="para">
   This has no effect on the query if all shards are reachable.  This flag was
   implemented in MongoDB version 1.7.5, so will only work with that version and
   higher.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongocursor.partial-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    
     <dt>

      <code class="parameter">okay</code>
     </dt>

     <dd>

      <p class="para">
       If receiving partial results is okay.
      </p>
     </dd>

       
   </dl>

  </p>
 </div>
 

 <div class="refsect1 returnvalues" id="refsect1-mongocursor.partial-returnvalues">
  <h3 class="title">Return Values</h3>  
  <p class="para">
   Returns this cursor.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mongocursor.partial-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">
   Throws <a href="class.mongocursorexception.html" class="classname">MongoCursorException</a> if this cursor has started iterating.
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongocursor.next.html">MongoCursor::next</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongocursor.reset.html">MongoCursor::reset</a></div>
 <div class="up"><a href="class.mongocursor.html">MongoCursor</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>