@@ 461-467 (lines=7) @@ | ||
458 | */ |
|
459 | public function transactionStart($transactionMode = false, $sessionCharacteristics = false) |
|
460 | { |
|
461 | if ($this->transactionNesting > 0) { |
|
462 | $this->transactionSavepoint('NESTEDTRANSACTION' . $this->transactionNesting); |
|
463 | } elseif ($this->connector instanceof SQLServerConnector) { |
|
464 | $this->connector->transactionStart(); |
|
465 | } else { |
|
466 | $this->query('BEGIN TRANSACTION'); |
|
467 | } |
|
468 | ++$this->transactionNesting; |
|
469 | } |
|
470 | ||
@@ 489-495 (lines=7) @@ | ||
486 | return false; |
|
487 | } |
|
488 | --$this->transactionNesting; |
|
489 | if ($this->transactionNesting > 0) { |
|
490 | $this->transactionRollback('NESTEDTRANSACTION' . $this->transactionNesting); |
|
491 | } elseif ($this->connector instanceof SQLServerConnector) { |
|
492 | $this->connector->transactionRollback(); |
|
493 | } else { |
|
494 | $this->query('ROLLBACK TRANSACTION'); |
|
495 | } |
|
496 | return true; |
|
497 | } |
|
498 | ||
@@ 506-513 (lines=8) @@ | ||
503 | return false; |
|
504 | } |
|
505 | --$this->transactionNesting; |
|
506 | if ($this->transactionNesting <= 0) { |
|
507 | $this->transactionNesting = 0; |
|
508 | if ($this->connector instanceof SQLServerConnector) { |
|
509 | $this->connector->transactionEnd(); |
|
510 | } else { |
|
511 | $this->query('COMMIT TRANSACTION'); |
|
512 | } |
|
513 | } |
|
514 | return true; |
|
515 | } |
|
516 |