mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 21:28:02 +02:00
Removed inTransaction definitely (BC break!)
This commit is contained in:
@@ -170,17 +170,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
throw new NotSupportedException('MSSQL driver does not support transaction testing.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
@@ -172,17 +172,6 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
throw new NotSupportedException('MSSQL 2005 driver does not support transaction testing.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
@@ -246,17 +246,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
return (bool) mysql_result(mysql_query('SELECT @@autocommit', $this->connection), 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
@@ -230,18 +230,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
$row = mysqli_fetch_row(mysqli_query($this->connection, 'SELECT @@autocommit'));
|
||||
return (bool) $row[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mysqli
|
||||
|
@@ -184,7 +184,7 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
return (bool) odbc_autocommit($this->connection);
|
||||
return !odbc_autocommit($this->connection);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -186,17 +186,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
throw new NotSupportedException('Oracle driver does not support transaction testing.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
@@ -197,17 +197,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
return (bool) $this->connection->getAttribute(PDO::ATTR_AUTOCOMMIT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return PDO
|
||||
|
@@ -208,17 +208,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
throw new NotSupportedException('PostgreSQL driver does not support transaction testing.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
@@ -193,17 +193,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
throw new NotSupportedException('SQLite driver does not support transaction testing.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
@@ -183,17 +183,6 @@ class DibiSqlite3Driver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
throw new NotSupportedException('SQLite3 driver does not support transaction testing.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
* @return mixed
|
||||
|
@@ -446,18 +446,6 @@ class DibiConnection extends DibiObject
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Is in transaction?
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
$this->connect();
|
||||
return $this->driver->inTransaction();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes data for use in a SQL statement.
|
||||
* @param string unescaped string
|
||||
|
@@ -145,12 +145,6 @@ 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