Merge "Revert "Log the reason why revision->getContent() returns null""
[lhc/web/wiklou.git] / includes / libs / rdbms / database / IDatabase.php
index 6047fb0..9ad78a7 100644 (file)
@@ -1,10 +1,5 @@
 <?php
 /**
- * @defgroup Database Database
- *
- * This file deals with database interface functions
- * and query specifics/optimisations.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -21,7 +16,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @ingroup Database
  */
 namespace Wikimedia\Rdbms;
 
@@ -30,6 +24,11 @@ use RuntimeException;
 use UnexpectedValueException;
 use stdClass;
 
+/**
+ * @defgroup Database Database
+ * This group deals with database interface functions
+ * and query specifics/optimisations.
+ */
 /**
  * Basic database interface for live and lazy-loaded relation database handles
  *
@@ -963,11 +962,11 @@ interface IDatabase {
         * Example usage:
         * @code
         *     $sql = $db->makeList( [
-        *         'rev_user' => $id,
+        *         'rev_page' => $id,
         *         $db->makeList( [ 'rev_minor' => 1, 'rev_len' < 500 ], $db::LIST_OR ] )
         *     ], $db::LIST_AND );
         * @endcode
-        * This would set $sql to "rev_user = '$id' AND (rev_minor = '1' OR rev_len < '500')"
+        * This would set $sql to "rev_page = '$id' AND (rev_minor = '1' OR rev_len < '500')"
         *
         * @param array $a Containing the data
         * @param int $mode IDatabase class constant:
@@ -1256,6 +1255,11 @@ interface IDatabase {
         * INSERT SELECT wrapper. Takes data from a SELECT query and inserts it
         * into another table.
         *
+        * @warning If the insert will use an auto-increment or sequence to
+        *  determine the value of a column, this may break replication on
+        *  databases using statement-based replication if the SELECT is not
+        *  deterministically ordered.
+        *
         * @param string $destTable The table name to insert into
         * @param string|array $srcTable May be either a table name, or an array of table names
         *    to include in a join.
@@ -1272,7 +1276,9 @@ interface IDatabase {
         * @param string $fname The function name of the caller, from __METHOD__
         *
         * @param array $insertOptions Options for the INSERT part of the query, see
-        *    IDatabase::insert() for details.
+        *    IDatabase::insert() for details. Also, one additional option is
+        *    available: pass 'NO_AUTO_COLUMNS' to hint that the query does not use
+        *    an auto-increment or sequence to determine any column values.
         * @param array $selectOptions Options for the SELECT part of the query, see
         *    IDatabase::select() for details.
         * @param array $selectJoinConds Join conditions for the SELECT part of the query, see
@@ -1772,7 +1778,7 @@ interface IDatabase {
        public function setSchemaVars( $vars );
 
        /**
-        * Check to see if a named lock is available (non-blocking)
+        * Check to see if a named lock is not locked by any thread (non-blocking)
         *
         * @param string $lockName Name of lock to poll
         * @param string $method Name of method calling us