Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
robsontenorio committed Dec 3, 2024
1 parent 53fbb2c commit d779f95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Pdo/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand All @@ -97,6 +99,7 @@ public function beginTransaction(): bool
*/
public function commit(): bool
{
$this->exec('COMMIT');
$this->setAutoCommit(true);

return (!\odbc_error($this->dbh))
Expand All @@ -111,6 +114,7 @@ public function commit(): bool
*/
public function rollBack(): bool
{
$this->exec('ROLLBACK');
$status = @\odbc_rollback($this->dbh);

if (!$status) {
Expand Down

0 comments on commit d779f95

Please sign in to comment.