(mongodb >=1.5.0)
MongoDB\Driver\Session::commitTransaction — 提交交易
儲存多文件交易中操作所做的變更並結束交易。在提交之前,交易內所做的任何資料變更在交易之外都是不可見的。
此函式沒有參數。
不回傳任何值。
"errorLabels"
元素,且此陣列包含 "TransientTransactionError"
或 "UnknownTransactionCommitResult"
值,則可以安全地重試整個交易。在新版本的擴充中,應該使用 MongoDB\Driver\Exception\RuntimeException::hasErrorLabel() 來測試這種情況。