]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add insertIgnoreConflict to IDBConnection interface.
authorOle Ostergaard <ole.c.ostergaard@gmail.com>
Tue, 26 Feb 2019 15:27:25 +0000 (16:27 +0100)
committerOle Ostergaard <ole.c.ostergaard@gmail.com>
Thu, 21 Mar 2019 10:42:00 +0000 (11:42 +0100)
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
lib/public/IDBConnection.php

index b3abe464845967a33af066c753fb72c4413bbbef..f640ec126f04d835fbb87de08780c6eafbb5ff93 100644 (file)
@@ -120,6 +120,20 @@ interface IDBConnection {
         */
        public function insertIfNotExist($table, $input, array $compare = null);
 
+
+       /**
+        *
+        * Insert a row if the row does not exist. Eventual conflicts during insert will be ignored.
+        *
+        * Implementation is not fully finished and should not be used!
+        *
+        * @param string $table The table name (will replace *PREFIX* with the actual prefix)
+        * @param array $input data that should be inserted into the table  (column name => value)
+        * @return int number of inserted rows
+        * @since 17.0.0
+        */
+       public function insertIgnoreConflict($table, $input) : int;
+
        /**
         * Insert or update a row value
         *