*/
public function pendingWriteCallers();
+ /**
+ * Get the number of affected rows from pending write queries
+ *
+ * @return integer
+ * @since 1.30
+ */
+ public function pendingWriteRowsAffected();
+
/**
* Is a connection to the database open?
* @return bool
* @param string|array $cond The condition array. See IDatabase::select() for details.
* @param string $fname The function name of the caller.
* @param string|array $options The query options. See IDatabase::select() for details.
+ * @param string|array $join_conds The query join conditions. See IDatabase::select() for details.
*
* @return bool|mixed The value from the field, or false on failure.
*/
public function selectField(
- $table, $var, $cond = '', $fname = __METHOD__, $options = []
+ $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
);
/**
* @param string|array $cond The condition array. See IDatabase::select() for details.
* @param string $fname The function name of the caller.
* @param string|array $options The query options. See IDatabase::select() for details.
+ * @param string|array $join_conds The query join conditions. See IDatabase::select() for details.
*
* @return bool|array The values from the field, or false on failure
* @since 1.25
*/
public function selectFieldValues(
- $table, $var, $cond = '', $fname = __METHOD__, $options = []
+ $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
);
/**
* IDatabase::insert() for details.
* @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
+ * IDatabase::select() for details.
*
- * @return IResultWrapper
+ * @return bool
*/
public function insertSelect( $destTable, $srcTable, $varMap, $conds,
$fname = __METHOD__,
- $insertOptions = [], $selectOptions = []
+ $insertOptions = [], $selectOptions = [], $selectJoinConds = []
);
/**
*/
public function unionQueries( $sqls, $all );
+ /**
+ * Construct a UNION query for permutations of conditions
+ *
+ * Databases sometimes have trouble with queries that have multiple values
+ * for multiple condition parameters combined with limits and ordering.
+ * This method constructs queries for the Cartesian product of the
+ * conditions and unions them all together.
+ *
+ * @see IDatabase::select()
+ * @since 1.30
+ * @param string|array $table Table name
+ * @param string|array $vars Field names
+ * @param array $permute_conds Conditions for the Cartesian product. Keys
+ * are field names, values are arrays of the possible values for that
+ * field.
+ * @param string|array $extra_conds Additional conditions to include in the
+ * query.
+ * @param string $fname Caller function name
+ * @param string|array $options Query options. In addition to the options
+ * recognized by IDatabase::select(), the following may be used:
+ * - NOTALL: Set to use UNION instead of UNION ALL.
+ * - INNER ORDER BY: If specified and supported, subqueries will use this
+ * instead of ORDER BY.
+ * @param string|array $join_conds Join conditions
+ * @return string SQL query string.
+ */
+ public function unionConditionPermutations(
+ $table, $vars, array $permute_conds, $extra_conds = '', $fname = __METHOD__,
+ $options = [], $join_conds = []
+ );
+
/**
* Returns an SQL expression for a simple conditional. This doesn't need
* to be overridden unless CASE isn't supported in your DBMS.