| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | final class Transaction extends AbstractTransactionPDO |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Creates a new savepoint. |
||
| 19 | * |
||
| 20 | * @param string $name the savepoint name. |
||
| 21 | * |
||
| 22 | * @throws Exception|InvalidConfigException|Throwable |
||
| 23 | */ |
||
| 24 | 5 | public function createSavepoint(string $name): void |
|
| 25 | { |
||
| 26 | 5 | $this->db->createCommand("SAVE TRANSACTION $name")->execute(); |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Releases an existing savepoint. |
||
| 31 | * |
||
| 32 | * @param string $name the savepoint name. |
||
| 33 | */ |
||
| 34 | 1 | public function releaseSavepoint(string $name): void |
|
| 36 | // does nothing as MSSQL doesn't support this |
||
| 37 | 1 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Rolls back to a before created savepoint. |
||
| 41 | * |
||
| 42 | * @param string $name the savepoint name. |
||
| 43 | * |
||
| 44 | * @throws Exception|InvalidConfigException|Throwable |
||
| 45 | */ |
||
| 46 | 2 | public function rollBackSavepoint(string $name): void |
|
| 51 |