[2.0] Formatting issues.
This commit is contained in:
parent
05173a867e
commit
f01320665a
@ -703,81 +703,80 @@ class Connection
|
|||||||
if ($this->_transactionNestingLevel == 1) {
|
if ($this->_transactionNestingLevel == 1) {
|
||||||
$this->_conn->commit();
|
$this->_conn->commit();
|
||||||
}
|
}
|
||||||
--$this->_transactionNestingLevel;
|
--$this->_transactionNestingLevel;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancel any database changes done during a transaction or since a specific
|
* Cancel any database changes done during a transaction or since a specific
|
||||||
* savepoint that is in progress. This function may only be called when
|
* savepoint that is in progress. This function may only be called when
|
||||||
* auto-committing is disabled, otherwise it will fail. Therefore, a new
|
* auto-committing is disabled, otherwise it will fail. Therefore, a new
|
||||||
* transaction is implicitly started after canceling the pending changes.
|
* transaction is implicitly started after canceling the pending changes.
|
||||||
*
|
*
|
||||||
* this method can be listened with onPreTransactionRollback and onTransactionRollback
|
* this method can be listened with onPreTransactionRollback and onTransactionRollback
|
||||||
* eventlistener methods
|
* eventlistener methods
|
||||||
*
|
*
|
||||||
* @param string $savepoint Name of a savepoint to rollback to.
|
* @param string $savepoint Name of a savepoint to rollback to.
|
||||||
* @throws Doctrine\DBAL\ConnectionException If the rollback operation fails at database level.
|
* @throws Doctrine\DBAL\ConnectionException If the rollback operation fails at database level.
|
||||||
* @return boolean FALSE if rollback couldn't be performed, TRUE otherwise.
|
* @return boolean FALSE if rollback couldn't be performed, TRUE otherwise.
|
||||||
*/
|
*/
|
||||||
public function rollback()
|
public function rollback()
|
||||||
{
|
{
|
||||||
if ($this->_transactionNestingLevel == 0) {
|
if ($this->_transactionNestingLevel == 0) {
|
||||||
throw ConnectionException::rollbackFailedNoActiveTransaction();
|
throw ConnectionException::rollbackFailedNoActiveTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->connect();
|
$this->connect();
|
||||||
|
|
||||||
if ($this->_transactionNestingLevel == 1) {
|
if ($this->_transactionNestingLevel == 1) {
|
||||||
$this->_transactionNestingLevel = 0;
|
$this->_transactionNestingLevel = 0;
|
||||||
$this->_conn->rollback();
|
$this->_conn->rollback();
|
||||||
|
}
|
||||||
|
--$this->_transactionNestingLevel;
|
||||||
|
|
||||||
}
|
return true;
|
||||||
--$this->_transactionNestingLevel;
|
}
|
||||||
|
|
||||||
return true;
|
/**
|
||||||
}
|
* Quotes pattern (% and _) characters in a string)
|
||||||
|
*
|
||||||
|
* EXPERIMENTAL
|
||||||
|
*
|
||||||
|
* WARNING: this function is experimental and may change signature at
|
||||||
|
* any time until labelled as non-experimental
|
||||||
|
*
|
||||||
|
* @param string the input string to quote
|
||||||
|
*
|
||||||
|
* @return string quoted string
|
||||||
|
*/
|
||||||
|
protected function _escapePattern($text)
|
||||||
|
{
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quotes pattern (% and _) characters in a string)
|
* Gets the wrapped driver connection.
|
||||||
*
|
*
|
||||||
* EXPERIMENTAL
|
* @return Doctrine\DBAL\Driver\Connection
|
||||||
*
|
*/
|
||||||
* WARNING: this function is experimental and may change signature at
|
public function getWrappedConnection()
|
||||||
* any time until labelled as non-experimental
|
{
|
||||||
*
|
$this->connect();
|
||||||
* @param string the input string to quote
|
return $this->_conn;
|
||||||
*
|
}
|
||||||
* @return string quoted string
|
|
||||||
*/
|
|
||||||
protected function _escapePattern($text)
|
|
||||||
{
|
|
||||||
return $text;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the wrapped driver connection.
|
* Gets the SchemaManager that can be used to inspect or change the
|
||||||
*
|
* database schema through the connection.
|
||||||
* @return Doctrine\DBAL\Driver\Connection
|
*
|
||||||
*/
|
* @return Doctrine\DBAL\Schema\SchemaManager
|
||||||
public function getWrappedConnection()
|
*/
|
||||||
{
|
public function getSchemaManager()
|
||||||
$this->connect();
|
{
|
||||||
return $this->_conn;
|
if ( ! $this->_schemaManager) {
|
||||||
}
|
$this->_schemaManager = $this->_driver->getSchemaManager($this);
|
||||||
|
}
|
||||||
/**
|
return $this->_schemaManager;
|
||||||
* Gets the SchemaManager that can be used to inspect or change the
|
}
|
||||||
* database schema through the connection.
|
|
||||||
*
|
|
||||||
* @return Doctrine\DBAL\Schema\SchemaManager
|
|
||||||
*/
|
|
||||||
public function getSchemaManager()
|
|
||||||
{
|
|
||||||
if ( ! $this->_schemaManager) {
|
|
||||||
$this->_schemaManager = $this->_driver->getSchemaManager($this);
|
|
||||||
}
|
|
||||||
return $this->_schemaManager;
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user