/** @var array Map of arbitrary name to value */
public $mProperties;
- /** @var DatabaseBase Database connection reference */
- public $mDb;
-
- /** @var array SELECT options to be used */
- public $mOptions;
-
/** @var bool Whether to queue jobs for recursive updates */
public $mRecursive;
* the beginTransaction() and commitTransaction() methods.
*/
abstract class SqlDataUpdate extends DataUpdate {
- /** @var DatabaseBase Database connection reference */
+ /** @var IDatabase Database connection reference */
protected $mDb;
/** @var array SELECT options to be used (array) */
public function __construct( $withTransaction = true ) {
parent::__construct();
- // @todo Get connection only when it's needed? Make sure that doesn't
- // break anything, especially transactions!
- $this->mDb = wfGetDB( DB_MASTER );
+ $this->mDb = wfGetLB()->getLazyConnectionRef( DB_MASTER );
$this->mWithTransaction = $withTransaction;
$this->mHasTransaction = false;