Skip to content
Snippets Groups Projects
Commit 63f2b1f4 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #11767 from danbartram/add_db_rollback

Add missing DB rollback functionality
parents 9fa54831 9c1015b7
No related branches found
No related tags found
No related merge requests found
...@@ -204,6 +204,13 @@ class OC_DB { ...@@ -204,6 +204,13 @@ class OC_DB {
return \OC::$server->getDatabaseConnection()->commit(); 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 * saves database schema to xml file
* @param string $file name of file * @param string $file name of file
......
...@@ -96,6 +96,13 @@ class DB { ...@@ -96,6 +96,13 @@ class DB {
\OC_DB::commit(); \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 * Check if a result is an error, works with Doctrine
* @param mixed $result * @param mixed $result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment