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