aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/AdapterSqlite.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-11-09 12:13:30 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-11-09 12:13:30 +0100
commit5273639d0e16e946ec25a51cfdd6696fde3d07cd (patch)
tree87a7c45ab576075f6ede17b860c16a81b7b54d7c /lib/private/DB/AdapterSqlite.php
parent230e93f5756dca187f77c8df3cf69e3d7e3d05ff (diff)
downloadnextcloud-server-5273639d0e16e946ec25a51cfdd6696fde3d07cd.tar.gz
nextcloud-server-5273639d0e16e946ec25a51cfdd6696fde3d07cd.zip
Add deprecation message ofr insertIfNotExist
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/DB/AdapterSqlite.php')
-rw-r--r--lib/private/DB/AdapterSqlite.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php
index 24650829aa3..0a482259b98 100644
--- a/lib/private/DB/AdapterSqlite.php
+++ b/lib/private/DB/AdapterSqlite.php
@@ -63,6 +63,7 @@ class AdapterSqlite extends Adapter {
* Please note: text fields (clob) must not be used in the compare array
* @return int number of inserted rows
* @throws \Doctrine\DBAL\DBALException
+ * @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371
*/
public function insertIfNotExist($table, $input, array $compare = null) {
if (empty($compare)) {