Closed bistory closed 14 years ago
Already supported by using the DB module:
try
{
DB::query(NULL, 'BEGIN')->execute();
Jelly::whatever();
DB::query(NULL, 'COMMIT')->execute();
}
catch (Database_Exception $e)
{
DB::query(NULL, 'ROLLBACK')->execute();
}
Yes like any other SQL query... The idea is to have an unified way to handle transactions.
The idea is to have an unified way to handle transactions.
I don't see that there is away since different DBMSs have different support for transactions. I don't feel it is the responsibility of Jelly to manage this when it is trying to be DB agnostic. loonies provides a neat and useable solution.
If you are using a specific DB and want to include methods in your models that use non-standard SQL features go ahead but I don't think this will go into the core.
Ok thanks, no prob :)
Add support for "BEGIN", "COMMIT" and "ROLLBACK". Simple short-hands like Jelly::begin() should be sufficient. This will help improving performances on InnoDB engine and will increase functionnality level for Jelly.
Thanks !