From 2dd7d3af513e4feb5d925fbef3edc1a51679a524 Mon Sep 17 00:00:00 2001 From: Pavol Biely Date: Wed, 20 Feb 2019 22:32:42 +0100 Subject: [PATCH] Connection: added inTransaction() --- src/Database/Connection.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Database/Connection.php b/src/Database/Connection.php index 547257c4c..12bd2e197 100644 --- a/src/Database/Connection.php +++ b/src/Database/Connection.php @@ -152,6 +152,12 @@ public function rollBack(): void } + public function inTransaction(): bool + { + return $this->pdo && $this->pdo->inTransaction(); + } + + /** * Generates and executes SQL query. */