mirror of
https://github.com/dg/dibi.git
synced 2025-08-10 16:14:57 +02:00
DibiConnection: inTransaction() is back, implemented in drivers
This commit is contained in:
@@ -452,11 +452,13 @@ class DibiConnection extends DibiObject
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
trigger_error('Deprecated: use "SELECT @@autocommit" query instead.', E_USER_WARNING);
|
||||
$this->connect();
|
||||
return $this->driver->inTransaction();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -145,6 +145,12 @@ interface IDibiDriver
|
||||
*/
|
||||
function rollback($savepoint = NULL);
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
function inTransaction();
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
Reference in New Issue
Block a user