* @return bool|mixed The value from the field, or false on failure.
*/
public function selectField(
- $table, $var, $cond = '', $fname = __METHOD__, $options = array()
+ $table, $var, $cond = '', $fname = __METHOD__, $options = []
);
/**
* @since 1.25
*/
public function selectFieldValues(
- $table, $var, $cond = '', $fname = __METHOD__, $options = array()
+ $table, $var, $cond = '', $fname = __METHOD__, $options = []
);
/**
*/
public function select(
$table, $vars, $conds = '', $fname = __METHOD__,
- $options = array(), $join_conds = array()
+ $options = [], $join_conds = []
);
/**
*/
public function selectSQLText(
$table, $vars, $conds = '', $fname = __METHOD__,
- $options = array(), $join_conds = array()
+ $options = [], $join_conds = []
);
/**
* @return stdClass|bool
*/
public function selectRow( $table, $vars, $conds, $fname = __METHOD__,
- $options = array(), $join_conds = array()
+ $options = [], $join_conds = []
);
/**
* @return int Row count
*/
public function estimateRowCount(
- $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = array()
+ $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = []
);
/**
* @return int Row count
*/
public function selectRowCount(
- $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = array(), $join_conds = array()
+ $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
);
/**
*
* @return bool
*/
- public function insert( $table, $a, $fname = __METHOD__, $options = array() );
+ public function insert( $table, $a, $fname = __METHOD__, $options = [] );
/**
* UPDATE wrapper. Takes a condition array and a SET array.
* - LOW_PRIORITY: MySQL-specific, see MySQL manual.
* @return bool
*/
- public function update( $table, $values, $conds, $fname = __METHOD__, $options = array() );
+ public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] );
/**
* Makes an encoded list of strings from an array
* @since 1.23
*/
public function buildGroupConcatField(
- $delim, $table, $field, $conds = '', $join_conds = array()
+ $delim, $table, $field, $conds = '', $join_conds = []
);
/**
*/
public function insertSelect( $destTable, $srcTable, $varMap, $conds,
$fname = __METHOD__,
- $insertOptions = array(), $selectOptions = array()
+ $insertOptions = [], $selectOptions = []
);
/**
public function wasReadOnlyError();
/**
- * Wait for the slave to catch up to a given master position.
+ * Wait for the slave to catch up to a given master position
*
* @param DBMasterPos $pos
- * @param int $timeout The maximum number of seconds to wait for
- * synchronisation
- * @return int Zero if the slave was past that position already,
+ * @param int $timeout The maximum number of seconds to wait for synchronisation
+ * @return int|null Zero if the slave was past that position already,
* greater than zero if we waited for some period of time, less than
- * zero if we timed out.
+ * zero if it timed out, and null on error
*/
public function masterPosWait( DBMasterPos $pos, $timeout );
* @param string $fname
* @param string $flush Flush flag, set to 'flush' to disable warnings about
* explicitly committing implicit transactions, or calling commit when no
- * transaction is in progress. This will silently break any ongoing
- * explicit transaction. Only set the flush flag if you are sure that it
- * is safe to ignore these warnings in your context.
+ * transaction is in progress.
+ *
+ * This will trigger an exception if there is an ongoing explicit transaction.
+ *
+ * Only set the flush flag if you are sure that these warnings are not applicable,
+ * and no explicit transactions are open.
+ *
* @throws DBUnexpectedError
*/
public function commit( $fname = __METHOD__, $flush = '' );