1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 13:17:58 +02:00

Removed inTransaction definitely (BC break!)

This commit is contained in:
David Grudl
2010-05-19 18:33:28 +02:00
parent 8b4cd4e689
commit d19afd5790
12 changed files with 1 additions and 119 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -184,7 +184,7 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
*/
public function inTransaction()
{
return (bool) odbc_autocommit($this->connection);
return !odbc_autocommit($this->connection);
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -145,12 +145,6 @@ interface IDibiDriver
*/
function rollback($savepoint = NULL);
/**
* Is in transaction?
* @return bool
*/
function inTransaction();
/**
* Returns the connection resource.
* @return mixed