add DB::transactionDepth() for checking how many transactions are active
when not using nested transactions, will return 1 or 0
This commit is contained in:
@@ -13,6 +13,7 @@ class TransactionTest_55 extends SimpleTest {
|
||||
|
||||
$depth = DB::startTransaction();
|
||||
$this->assert($depth === 3);
|
||||
$this->assert(DB::transactionDepth() === 3);
|
||||
DB::query("UPDATE accounts SET age=%i WHERE username=%s", 500, 'Abe');
|
||||
$depth = DB::commit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user