From 8b35064395fa8390d9972856145f2907f6208515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 24 Aug 2023 11:46:27 +0800 Subject: [PATCH] qqq --- Connection.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Connection.php b/Connection.php index 3e5f584..6191c15 100644 --- a/Connection.php +++ b/Connection.php @@ -171,25 +171,6 @@ class Connection extends Component return $this->getNormalClientHealth(); } - - /** - * @return $this - * @throws Exception - */ - public function beginTransaction(): static - { - if ($this->storey == 0) { - /** @var PDO $pdo */ - $pdo = Context::get($this->cds); - if ($pdo instanceof PDO && !$pdo->inTransaction()) { - $pdo->beginTransaction(); - } - } - $this->storey++; - return $this; - } - - /** * @param PDO|null $client * @return bool @@ -210,6 +191,25 @@ class Connection extends Component } + + /** + * @return $this + * @throws Exception + */ + public function beginTransaction(): static + { + if ($this->storey == 0) { + /** @var PDO $pdo */ + $pdo = Context::get($this->cds); + if ($pdo instanceof PDO && !$pdo->inTransaction()) { + $pdo->beginTransaction(); + } + } + $this->storey++; + return $this; + } + + /** * @return PDO * @throws Exception