database
database copied to clipboard
Connection: added inTransaction()
A new inTransaction() method might be a very useful shortcut.
Calling is unnecessary long right now.
/* @var \Nette\Database\Connection $db */
if ($db->getPdo()->inTransaction()) {
$db->rollBack();
}
Why not just use it like this?
/* @var \Nette\Database\Connection $db */
if ($db->inTransaction()) {
$db->rollBack();
}
Other shortcuts like beginTransaction(), commit() and rollback() are already implemented in Connection class.
Is there something wrong with the implementation? I could help but got no response.
@dg What do you think?
Please can you add simple test?