26 $this->fname = $fname;
27 $this->callback = $callback;
30 foreach ( $conns as $conn ) {
31 if ( $conn->trxLevel() ) {
38 if ( !$this->callback ) {
42 $autoTrx = $this->dbw->getFlag(
DBO_TRX );
43 $this->dbw->clearFlag(
DBO_TRX );
45 ( $this->callback )( $this->dbw, $this->fname );
58 if ( $trigger === IDatabase::TRIGGER_ROLLBACK ) {
59 $this->callback =
null;
Deferrable Update for closure/callback updates that should use auto-commit mode.
doUpdate()
Perform the actual work.
cancelOnRollback( $trigger)
__construct(IDatabase $dbw, $fname, callable $callback, array $conns=[])
Callback wrapper that has an originating method.
Interface that deferrable updates should implement.