<?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-session.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'mongodb-driver-session.committransaction.php',
    1 => 'MongoDB\\Driver\\Session::commitTransaction',
    2 => 'Commits a transaction',
  ),
  'up' => 
  array (
    0 => 'class.mongodb-driver-session.php',
    1 => 'MongoDB\\Driver\\Session',
  ),
  'prev' => 
  array (
    0 => 'mongodb-driver-session.advanceoperationtime.php',
    1 => 'MongoDB\\Driver\\Session::advanceOperationTime',
  ),
  'next' => 
  array (
    0 => 'mongodb-driver-session.construct.php',
    1 => 'MongoDB\\Driver\\Session::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mongodb/mongodb/driver/session/committransaction.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mongodb-driver-session.committransaction" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\Driver\Session::commitTransaction</h1>
  <p class="verinfo">(mongodb &gt;=1.5.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Session::commitTransaction</span> &mdash; <span class="dc-title">Commits a transaction</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb-driver-session.committransaction-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\Session::commitTransaction</strong></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="simpara">
   Saves the changes made by the operations in the multi-document transaction
   and ends the transaction. Until the commit, none of the data changes made
   from within the transaction are visible outside the transaction.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb-driver-session.committransaction-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">この関数にはパラメータはありません。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-session.committransaction-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="simpara">
   値を返しません。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mongodb-driver-session.committransaction-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> on argument parsing errors.</li>
   <li>Throws
   <span class="classname"><a href="class.mongodb-driver-exception-commandexception.php" class="classname">MongoDB\Driver\Exception\CommandException</a></span> if the
   server could not commit the transaction (e.g. due to conflicts, network
   issues). In case the exception's
   <span class="methodname"><a href="mongodb-driver-commandexception.getresultdocument.php" class="methodname">MongoDB\Driver\Exception\CommandException::getResultDocument()</a></span>
   has a <code class="literal">&quot;errorLabels&quot;</code> element, and this array contains a
   <code class="literal">&quot;TransientTransactionError&quot;</code> or
   <code class="literal">&quot;UnknownTransactionCommitResult&quot;</code> value, it is safe to re-try
   the <em>whole</em> transaction. In newer versions of the
   extension,
   <span class="methodname"><a href="mongodb-driver-runtimeexception.haserrorlabel.php" class="methodname">MongoDB\Driver\Exception\RuntimeException::hasErrorLabel()</a></span>
   should be used to test for this situation instead.</li>
   <li>Throws
   <span class="classname"><a href="class.mongodb-driver-exception-runtimeexception.php" class="classname">MongoDB\Driver\Exception\RuntimeException</a></span> if the
   transaction could not be commited (e.g. a transaction was not
   started).</li>
  </ul>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongodb-driver-session.committransaction-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="mongodb-driver-manager.startsession.php" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Manager::startSession()</a> - Start a new client session for use with this client</span></li>
   <li><span class="methodname"><a href="mongodb-driver-session.aborttransaction.php" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Session::abortTransaction()</a> - Aborts a transaction</span></li>
   <li><span class="methodname"><a href="mongodb-driver-session.starttransaction.php" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Session::startTransaction()</a> - Starts a transaction</span></li>
   <li><span class="methodname"><a href="mongodb-driver-runtimeexception.haserrorlabel.php" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Exception\RuntimeException::hasErrorLabel()</a> - Returns whether an error label is associated with an exception</span></li>
  </ul>
 </div>


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