* Support transaction for sqlite.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user