- Fixed transactions in SQLite
This commit is contained in:
1 parent
d4181065cf
commit
aa07c728fe
2 files changed
+21
-9
No files matched your search
@@ -8,8 +8,8 @@ class SqlPdoObject extends \Ulmus\Common\PdoObject
|
||||
|
||||
public function beginTransaction(): bool
|
||||
{
|
||||
if ( 0 === ++$this->openedTransaction ) {
|
||||
return parent::beginTransaction();
|
||||
if ( 0 === $this->openedTransaction++ ) {
|
||||
return $this->openTransaction();
|
||||
}
|
||||
|
||||
return $this->exec('SAVEPOINT transaction_'.$this->openedTransaction) !== false;
|
||||
@@ -32,4 +32,9 @@ class SqlPdoObject extends \Ulmus\Common\PdoObject
|
||||
|
||||
return parent::rollback();
|
||||
}
|
||||
|
||||
protected function openTransaction() : bool
|
||||
{
|
||||
return parent::beginTransaction();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user