<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.mongodb-driver-server.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'mongodb-driver-server.executebulkwritecommand.php',
    1 => 'MongoDB\\Driver\\Server::executeBulkWriteCommand',
    2 => 'Execute write operations on this server using the bulkWrite command',
  ),
  'up' => 
  array (
    0 => 'class.mongodb-driver-server.php',
    1 => 'MongoDB\\Driver\\Server',
  ),
  'prev' => 
  array (
    0 => 'mongodb-driver-server.executebulkwrite.php',
    1 => 'MongoDB\\Driver\\Server::executeBulkWrite',
  ),
  'next' => 
  array (
    0 => 'mongodb-driver-server.executecommand.php',
    1 => 'MongoDB\\Driver\\Server::executeCommand',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mongodb/mongodb/driver/server/executebulkwritecommand.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mongodb-driver-server.executebulkwritecommand" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\Driver\Server::executeBulkWriteCommand</h1>
  <p class="verinfo">(mongodb &gt;=2.1.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Server::executeBulkWriteCommand</span> &mdash; <span class="dc-title">Execute write operations on this server using the bulkWrite command</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb-driver-server.executebulkwritecommand-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><strong>MongoDB\Driver\Server::executeBulkWriteCommand</strong></span>(<span class="methodparam"><span class="type"><a href="class.mongodb-driver-bulkwritecommand.php" class="type MongoDB\Driver\BulkWriteCommand">MongoDB\Driver\BulkWriteCommand</a></span> <code class="parameter">$bulk</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.array.php" class="type array">array</a></span></span> <code class="parameter">$options</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="class.mongodb-driver-bulkwritecommandresult.php" class="type MongoDB\Driver\BulkWriteCommandResult">MongoDB\Driver\BulkWriteCommandResult</a></span></div>

  <p class="simpara">
   Executes one or more write operations on this server using the
   <a href="https://www.mongodb.com/docs/manual/reference/command/bulkWrite" class="link external">&raquo;&nbsp;bulkWrite</a>
   command introduced in MongoDB 8.0.
  </p>
  <p class="simpara">
   A <span class="classname"><a href="class.mongodb-driver-bulkwritecommand.php" class="classname">MongoDB\Driver\BulkWriteCommand</a></span> can be constructed
   with one or more write operations of varying types (e.g. inserts, updates,
   and deletes). Each write operation may target a different collection.
  </p>
  <p class="simpara">
   The default value for the <code class="literal">&quot;writeConcern&quot;</code> option will be
   inferred from an active transaction (indicated by the
   <code class="literal">&quot;session&quot;</code> option), followed by the
   <a href="mongodb-driver-manager.construct.php#mongodb-driver-manager.construct-uri" class="link">connection URI</a>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb-driver-server.executebulkwritecommand-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
   
    <dt><code class="parameter">bulk</code> (<span class="classname"><a href="class.mongodb-driver-bulkwritecommand.php" class="classname">MongoDB\Driver\BulkWriteCommand</a></span>)</dt>
    <dd>
     <p class="para">
      The write(s) to execute.
     </p>
    </dd>
   

   
    <dt><code class="parameter">options</code></dt>
    <dd>
     <p class="para">
      <table class="doctable table">
       <caption><strong>options</strong></caption>
       
        <thead>
         <tr>
          <th>Option</th>
          <th>Type</th>
          <th>Description</th>
         </tr>

        </thead>

        <tbody class="tbody">
         
         <tr>
          <td>session</td>
          <td><span class="classname"><a href="class.mongodb-driver-session.php" class="classname">MongoDB\Driver\Session</a></span></td>
          <td>
           <p class="para">
            A session to associate with the operation.
           </p>
          </td>
         </tr>


         
         <tr>
          <td>writeConcern</td>
          <td><span class="classname"><a href="class.mongodb-driver-writeconcern.php" class="classname">MongoDB\Driver\WriteConcern</a></span></td>
          <td>
           <p class="para">
            A write concern to apply to the operation.
           </p>
          </td>
         </tr>


        </tbody>
       
      </table>

     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-server.executebulkwritecommand-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">Returns <span class="classname"><a href="class.mongodb-driver-bulkwritecommandresult.php" class="classname">MongoDB\Driver\BulkWriteCommandResult</a></span> on success.</p>
 </div>


 <div class="refsect1 errors" id="refsect1-mongodb-driver-server.executebulkwritecommand-errors">
  <h3 class="title">エラー / 例外</h3>
  <ul class="simplelist">
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.php" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span> if <code class="parameter">bulk</code> does not contain any write operations.</li>
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.php" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span> if <code class="parameter">bulk</code> has already been executed. <span class="classname"><a href="class.mongodb-driver-bulkwritecommand.php" class="classname">MongoDB\Driver\BulkWriteCommand</a></span> objects may not be executed multiple times.</li>
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.php" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span> if the <code class="literal">&quot;session&quot;</code> option is used in combination with an unacknowledged write concern.</li>
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.php" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span> on argument parsing errors.</li><li>Throws <span class="classname"><a href="class.mongodb-driver-exception-connectionexception.php" class="classname">MongoDB\Driver\Exception\ConnectionException</a></span> if connection to the server fails (for reasons other than authentication).</li><li>Throws <span class="classname"><a href="class.mongodb-driver-exception-authenticationexception.php" class="classname">MongoDB\Driver\Exception\AuthenticationException</a></span> if authentication is needed and fails.</li>
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-bulkwritecommandexception.php" class="classname">MongoDB\Driver\Exception\BulkWriteCommandException</a></span> on any write failure (e.g. command failure, write or write concern error)</li>
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-runtimeexception.php" class="classname">MongoDB\Driver\Exception\RuntimeException</a></span> on other errors.</li>
  </ul>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongodb-driver-server.executebulkwritecommand-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li><span class="classname"><a href="class.mongodb-driver-bulkwritecommand.php" class="classname">MongoDB\Driver\BulkWriteCommand</a></span></li>
   <li><span class="classname"><a href="class.mongodb-driver-bulkwritecommandresult.php" class="classname">MongoDB\Driver\BulkWriteCommandResult</a></span></li>
   <li><span class="classname"><a href="class.mongodb-driver-writeconcern.php" class="classname">MongoDB\Driver\WriteConcern</a></span></li>
   <li><span class="function"><a href="mongodb-driver-manager.executebulkwritecommand.php" class="function" rel="rdfs-seeAlso">MongoDB\Driver\Manager::executeBulkWriteCommand()</a> - Execute write operations using the bulkWrite command</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>