Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-05-19 13:34:40 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2016-05-21 02:59:03 +0300
commit7e3ce8352666af86d597e1fdce95bfe57531207e (patch)
tree4d0641773e8f1e740285ea7b6bfdf497409a5b78 /lib/public/IDBConnection.php
parent59a85a4c76b80658d9373e3acf4f71b872b244a0 (diff)
Add a method to lock a table
Diffstat (limited to 'lib/public/IDBConnection.php')
-rw-r--r--lib/public/IDBConnection.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php
index 780fcd26364..4ecf01ca27e 100644
--- a/lib/public/IDBConnection.php
+++ b/lib/public/IDBConnection.php
@@ -125,6 +125,25 @@ interface IDBConnection {
public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []);
/**
+ * Create an exclusive read+write lock on a table
+ *
+ * Important Note: Due to the nature how locks work on different DBs, it is
+ * only possible to lock one table at a time. You should also NOT start a
+ * transaction while holding a lock.
+ *
+ * @param string $tableName
+ * @since 9.1.0
+ */
+ public function lockTable($tableName);
+
+ /**
+ * Release a previous acquired lock again
+ *
+ * @since 9.1.0
+ */
+ public function unlockTable();
+
+ /**
* Start a transaction
* @since 6.0.0
*/