Permalink
Browse files

Renamed method to check if the driver supports nested transaction.

  • Loading branch information...
1 parent f150ebb commit 37537faac0665aaf42c0d222b54c7235055ac77a @jrbasso jrbasso committed Apr 27, 2012
@@ -681,7 +681,7 @@ public function getSchemaName() {
*
* @return boolean
*/
- public function supportNestedTransaction() {
+ public function nestedTransactionSupported() {
return $this->nestedTransaction && version_compare($this->getVersion(), '4.1', '>=');
}
@@ -900,7 +900,7 @@ public function getSchemaName() {
*
* @return boolean
*/
- public function supportNestedTransaction() {
+ public function nestedTransactionSupported() {
return $this->nestedTransaction && version_compare($this->getVersion(), '8.0', '>=');
}
@@ -564,7 +564,7 @@ public function getSchemaName() {
*
* @return boolean
*/
- public function supportNestedTransaction() {
+ public function nestedTransactionSupported() {
return $this->nestedTransaction && version_compare($this->getVersion(), '3.6.8', '>=');
}
@@ -2031,7 +2031,7 @@ public function truncate($table) {
*
* @return boolean
*/
- public function supportNestedTransaction() {
+ public function nestedTransactionSupported() {
return false;
}
@@ -2044,7 +2044,7 @@ public function supportNestedTransaction() {
*/
public function begin() {
if ($this->_transactionStarted) {
- if ($this->supportNestedTransaction()) {
+ if ($this->nestedTransactionSupported()) {
return $this->_beginNested();
}
$this->_transactionNesting++;
@@ -2092,7 +2092,7 @@ public function commit() {
return $this->_connection->commit();
}
- if ($this->supportNestedTransaction()) {
+ if ($this->nestedTransactionSupported()) {
return $this->_commitNested();
}
@@ -2134,7 +2134,7 @@ public function rollback() {
return $this->_connection->rollBack();
}
- if ($this->supportNestedTransaction()) {
+ if ($this->nestedTransactionSupported()) {
return $this->_rollbackNested();
}
@@ -3588,7 +3588,7 @@ public function testTruncateStatements() {
public function testNestedTransaction() {
$nested = $this->Dbo->nestedTransaction;
$this->Dbo->nestedTransaction = true;
- if ($this->Dbo->supportNestedTransaction() === false) {
+ if ($this->Dbo->nestedTransactionSupported() === false) {
$this->Dbo->nestedTransaction = $nested;
$this->skipIf(true, 'The MySQL server do not support nested transaction');
}
@@ -915,7 +915,7 @@ public function testTruncateStatements() {
* @return void
*/
public function testNestedTransaction() {
- $this->skipIf($this->Dbo->supportNestedTransaction() === false, 'The Postgres server do not support nested transaction');
+ $this->skipIf($this->Dbo->nestedTransactionSupported() === false, 'The Postgres server do not support nested transaction');
$this->loadFixtures('Article');
$model = new Article();
@@ -389,7 +389,7 @@ public function testUuidPrimaryKeyInsertion() {
* @return void
*/
public function testNestedTransaction() {
- $this->skipIf($this->Dbo->supportNestedTransaction() === false, 'The Sqlite version do not support nested transaction');
+ $this->skipIf($this->Dbo->nestedTransactionSupported() === false, 'The Sqlite version do not support nested transaction');
$this->loadFixtures('User');
$model = new User();
@@ -53,7 +53,7 @@ public function setConnection($conn) {
$this->_connection = $conn;
}
- public function supportNestedTransaction() {
+ public function nestedTransactionSupported() {
return $this->nestedTransaction && $this->nestedSupport;
}

0 comments on commit 37537fa

Please sign in to comment.