Skip to content

Commit

Permalink
feat: 补全注释
Browse files Browse the repository at this point in the history
  • Loading branch information
dd committed Nov 24, 2020
1 parent adfe299 commit c87e146
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Jenssegers/Mongodb/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ public function __call($method, $parameters)
return call_user_func_array([$this->db, $method], $parameters);
}

/**
* @param Closure $callback
* @param int $attempts
* @return mixed
* @throws Throwable
*/
public function transaction(Closure $callback, $attempts = 1) {
for ($currentAttempt = 1; $currentAttempt <= $attempts; $currentAttempt++) {
$this->beginTransaction();
Expand Down

0 comments on commit c87e146

Please sign in to comment.