Skip to content

Commit e39c099

Browse files
committed
Fixed nested transaction;
1 parent 6067683 commit e39c099

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/Transaction.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,14 @@ public function setIsolationLevel($level)
188188
Yii::trace('Setting transaction isolation level to ' . $level, __METHOD__);
189189
$this->db->getSchema()->setTransactionIsolationLevel($level);
190190
}
191+
192+
/**
193+
* @return integer The current nesting level of the transaction.
194+
* @since 2.0.8
195+
*/
196+
public function getLevel()
197+
{
198+
return $this->_level;
199+
}
200+
191201
}

tests/CommandTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ public function testBindParamValue()
120120
$this->assertEquals('[email protected]', $command->queryScalar());
121121
}
122122

123+
/**
124+
* Test whether param binding works in other places than WHERE
125+
* @dataProvider paramsNonWhereProvider
126+
*/
123127
public function testBindParamsNonWhere($sql)
124128
{
125129
$this->markTestSkipped('firebird does not support parameter in function');

0 commit comments

Comments
 (0)