From d779f95c4ffaea269c5a07fe2cdaa225297226de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robson=20Ten=C3=B3rio?= Date: Tue, 3 Dec 2024 19:52:02 -0300 Subject: [PATCH] WIP --- src/Pdo/Cache.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Pdo/Cache.php b/src/Pdo/Cache.php index 9b52a1d..57d19c3 100644 --- a/src/Pdo/Cache.php +++ b/src/Pdo/Cache.php @@ -87,7 +87,9 @@ public function exec($statement): int */ public function beginTransaction(): bool { - return $this->setAutoCommit(false); + $this->setAutoCommit(false); + + return $this->exec('START TRANSACTION'); } /** @@ -97,6 +99,7 @@ public function beginTransaction(): bool */ public function commit(): bool { + $this->exec('COMMIT'); $this->setAutoCommit(true); return (!\odbc_error($this->dbh)) @@ -111,6 +114,7 @@ public function commit(): bool */ public function rollBack(): bool { + $this->exec('ROLLBACK'); $status = @\odbc_rollback($this->dbh); if (!$status) {