* Support transaction for sqlite.

This commit is contained in:
zhouxin
2023-06-25 14:14:57 +08:00
parent 109fdab6ff
commit 87ce87fcc0
+33
View File
@@ -182,6 +182,39 @@ class sqlite
return $this->dbh->exec($sql);
}
/**
* Begin transaction.
*
* @access public
* @return bool
*/
public function beginTransaction()
{
return $this->dbh->beginTransaction();
}
/**
* Roll back if transaction failed.
*
* @access public
* @return bool
*/
public function rollBack()
{
return $this->dbh->rollBack();
}
/**
* Commit transaction.
*
* @access public
* @return bool
*/
public function commit()
{
return $this->dbh->commit();
}
/**
* Execute sql without format.
*