* @param array $a Array of rows to insert
* @param string $fname Calling function name (use __METHOD__) for logs/profiling
* @param array $options Array of options
- *
- * @return bool
+ * @return bool Return true if no exception was thrown (deprecated since 1.33)
* @throws DBError
*/
public function insert( $table, $a, $fname = __METHOD__, $options = [] );
* @param array $options An array of UPDATE options, can be:
* - IGNORE: Ignore unique key conflicts
* - LOW_PRIORITY: MySQL-specific, see MySQL manual.
- * @return bool
+ * @return bool Return true if no exception was thrown (deprecated since 1.33)
* @throws DBError
*/
public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] );
/**
* Change the current database
*
+ * This should not be called outside LoadBalancer for connections managed by a LoadBalancer
+ *
* @param string $db
* @return bool True unless an exception was thrown
* @throws DBConnectionError If databasesAreIndependent() is true and an error occurs
* @throws DBError
- * @deprecated Since 1.32
+ * @deprecated Since 1.32 Use selectDomain() instead
*/
public function selectDB( $db );
*
* This will throw an error for some database types if the database unspecified
*
+ * This should not be called outside LoadBalancer for connections managed by a LoadBalancer
+ *
* @param string|DatabaseDomain $domain
* @since 1.32
* @throws DBConnectionError
*/
public function addQuotes( $s );
+ /**
+ * Quotes an identifier, in order to make user controlled input safe
+ *
+ * Depending on the database this will either be `backticks` or "double quotes"
+ *
+ * @param string $s
+ * @return string
+ * @since 1.33
+ */
+ public function addIdentifierQuotes( $s );
+
/**
* LIKE statement wrapper, receives a variable-length argument list with
* parts of pattern to match containing either string literals that will be
* things like "field = field + 1" or similar computed values.
* @param string $fname Calling function name (use __METHOD__) for logs/profiling
* @throws DBError
- * @return bool
+ * @return bool Return true if no exception was thrown (deprecated since 1.33)
*/
public function upsert(
$table, array $rows, array $uniqueIndexes, array $set, $fname = __METHOD__
* for the format. Use $conds == "*" to delete all rows
* @param string $fname Name of the calling function
* @throws DBUnexpectedError
- * @return bool|IResultWrapper
+ * @return bool Return true if no exception was thrown (deprecated since 1.33)
* @throws DBError
*/
public function delete( $table, $conds, $fname = __METHOD__ );
* @param array $selectJoinConds Join conditions for the SELECT part of the query, see
* IDatabase::select() for details.
*
- * @return bool
+ * @return bool Return true if no exception was thrown (deprecated since 1.33)
* @throws DBError
*/
public function insertSelect( $destTable, $srcTable, $varMap, $conds,
/**
* Wait for the replica DB to catch up to a given master position
*
+ * Note that this does not start any new transactions. If any existing transaction
+ * is flushed, and this is called, then queries will reflect the point the DB was synced
+ * up to (on success) without interference from REPEATABLE-READ snapshots.
+ *
* @param DBMasterPos $pos
* @param int $timeout The maximum number of seconds to wait for synchronisation
* @return int|null Zero if the replica DB was past that position already,