Merge "Improve "selfmove" message's wording"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / IDatabase.php
index 9375efc..78889e5 100644 (file)
@@ -206,6 +206,7 @@ interface IDatabase {
         * Returns true if this database does an implicit sort when doing GROUP BY
         *
         * @return bool
+        * @deprecated Since 1.30; only use grouped or aggregated fields in the SELECT
         */
        public function implicitGroupby();
 
@@ -420,12 +421,9 @@ interface IDatabase {
        /**
         * Get the inserted value of an auto-increment row
         *
-        * The value inserted should be fetched from nextSequenceValue()
-        *
-        * Example:
-        * $id = $dbw->nextSequenceValue( 'page_page_id_seq' );
-        * $dbw->insert( 'page', [ 'page_id' => $id ] );
-        * $id = $dbw->insertId();
+        * This should only be called after an insert that used an auto-incremented
+        * value. If no such insert was previously done in the current database
+        * session, the return value is undefined.
         *
         * @return int
         */
@@ -1114,15 +1112,20 @@ interface IDatabase {
        public function anyString();
 
        /**
-        * Returns an appropriately quoted sequence value for inserting a new row.
-        * MySQL has autoincrement fields, so this is just NULL. But the PostgreSQL
-        * subclass will return an integer, and save the value for insertId()
+        * Deprecated method, calls should be removed.
+        *
+        * This was formerly used for PostgreSQL and Oracle to handle
+        * self::insertId() auto-incrementing fields. It is no longer necessary
+        * since DatabasePostgres::insertId() has been reimplemented using
+        * `lastval()` and Oracle has been reimplemented using triggers.
+        *
+        * Implementations should return null if inserting `NULL` into an
+        * auto-incrementing field works, otherwise it should return an instance of
+        * NextSequenceValue and filter it on calls to relevant methods.
         *
-        * Any implementation of this function should *not* involve reusing
-        * sequence numbers created for rolled-back transactions.
-        * See https://bugs.mysql.com/bug.php?id=30767 for details.
+        * @deprecated since 1.30, no longer needed
         * @param string $seqName
-        * @return null|int
+        * @return null|NextSequenceValue
         */
        public function nextSequenceValue( $seqName );