| @@ 79-88 (lines=10) @@ | ||
| 76 | * @override |
|
| 77 | * @inheritDoc |
|
| 78 | */ |
|
| 79 | public function commit() |
|
| 80 | { |
|
| 81 | return $this->connector->execute('COMMIT')->success(function (CommandResultStatement $result) { |
|
| 82 | if ($result) { |
|
| 83 | $this->emitter->emit('transaction:end'); |
|
| 84 | } |
|
| 85 | ||
| 86 | return $result; |
|
| 87 | }); |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * @override |
|
| @@ 94-103 (lines=10) @@ | ||
| 91 | * @override |
|
| 92 | * @inheritDoc |
|
| 93 | */ |
|
| 94 | public function rollback() |
|
| 95 | { |
|
| 96 | return $this->connector->execute('ROLLBACK')->success(function (CommandResultStatement $result) { |
|
| 97 | if ($result) { |
|
| 98 | $this->emitter->emit('transaction:end'); |
|
| 99 | } |
|
| 100 | ||
| 101 | return $result; |
|
| 102 | }); |
|
| 103 | } |
|
| 104 | } |
|
| 105 | ||