| @@ 376-383 (lines=8) @@ | ||
| 373 | * @param string $name Savepoint name/id, must not contain spaces and be valid database |
|
| 374 | * identifier. |
|
| 375 | */ |
|
| 376 | protected function savepointCreate(string $name) |
|
| 377 | { |
|
| 378 | if ($this->isProfiling()) { |
|
| 379 | $this->logger()->info("Creating savepoint '{$name}'"); |
|
| 380 | } |
|
| 381 | ||
| 382 | $this->statement('SAVEPOINT ' . $this->identifier("SVP{$name}")); |
|
| 383 | } |
|
| 384 | ||
| 385 | /** |
|
| 386 | * Commit/release savepoint. |
|
| @@ 393-400 (lines=8) @@ | ||
| 390 | * @param string $name Savepoint name/id, must not contain spaces and be valid database |
|
| 391 | * identifier. |
|
| 392 | */ |
|
| 393 | protected function savepointRelease(string $name) |
|
| 394 | { |
|
| 395 | if ($this->isProfiling()) { |
|
| 396 | $this->logger()->info("Releasing savepoint '{$name}'"); |
|
| 397 | } |
|
| 398 | ||
| 399 | $this->statement('RELEASE SAVEPOINT ' . $this->identifier("SVP{$name}")); |
|
| 400 | } |
|
| 401 | ||
| 402 | /** |
|
| 403 | * Rollback savepoint. |
|
| @@ 410-416 (lines=7) @@ | ||
| 407 | * @param string $name Savepoint name/id, must not contain spaces and be valid database |
|
| 408 | * identifier. |
|
| 409 | */ |
|
| 410 | protected function savepointRollback(string $name) |
|
| 411 | { |
|
| 412 | if ($this->isProfiling()) { |
|
| 413 | $this->logger()->info("Rolling back savepoint '{$name}'"); |
|
| 414 | } |
|
| 415 | $this->statement('ROLLBACK TO SAVEPOINT ' . $this->identifier("SVP{$name}")); |
|
| 416 | } |
|
| 417 | } |
|
| 418 | ||