Merge pull request #11767 from danbartram/add_db_rollback

Add missing DB rollback functionality
This commit is contained in:
Morris Jobke 2014-10-24 19:52:56 +02:00
commit 63f2b1f460
2 changed files with 14 additions and 0 deletions

View File

@ -204,6 +204,13 @@ class OC_DB {
return \OC::$server->getDatabaseConnection()->commit();
}
/**
* Rollback the database changes done during a transaction that is in progress
*/
public static function rollback() {
return \OC::$server->getDatabaseConnection()->rollback();
}
/**
* saves database schema to xml file
* @param string $file name of file

View File

@ -96,6 +96,13 @@ class DB {
\OC_DB::commit();
}
/**
* Rollback the database changes done during a transaction that is in progress
*/
public static function rollback() {
\OC_DB::rollback();
}
/**
* Check if a result is an error, works with Doctrine
* @param mixed $result