*/
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 = []
);
/**
*/
public function buildStringCast( $field );
+ /**
+ * Returns true if DBs are assumed to be on potentially different servers
+ *
+ * In systems like mysql/mariadb, different databases can easily be referenced on a single
+ * connection merely by name, even in a single query via JOIN. On the other hand, Postgres
+ * treats databases as fully separate, only allowing mechanisms like postgres_fdw to
+ * effectively "mount" foreign DBs. This is true even among DBs on the same server.
+ *
+ * @return bool
+ * @since 1.29
+ */
+ public function databasesAreIndependent();
+
/**
* Change the current database
*
* @param string $db
* @return bool Success or failure
+ * @throws DBConnectionError If databasesAreIndependent() is true and an error occurs
*/
public function selectDB( $db );
* 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
*/
public function insertSelect( $destTable, $srcTable, $varMap, $conds,
$fname = __METHOD__,
- $insertOptions = [], $selectOptions = []
+ $insertOptions = [], $selectOptions = [], $selectJoinConds = []
);
/**