Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\ChangeOp\ChangeOpResult Interface Reference

Each ChangeOp applied will return an instance of ChangeOpResult. More...

+ Inheritance diagram for Wikibase\Repo\ChangeOp\ChangeOpResult:

Public Member Functions

 getEntityId ()
 The id of the entity document that the change op was applied to. More...
 
 isEntityChanged ()
 Whether the entity document was actually changed in any way as a result of applying the change op to it. More...
 
 validate ()
 Validate a ChangeOpResult. More...
 

Detailed Description

Each ChangeOp applied will return an instance of ChangeOpResult.

See also
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/518721/

Member Function Documentation

◆ getEntityId()

Wikibase\Repo\ChangeOp\ChangeOpResult::getEntityId ( )

The id of the entity document that the change op was applied to.

Returns
EntityId|null

Implemented in Wikibase\Repo\ChangeOp\GenericChangeOpResult, Wikibase\Repo\ChangeOp\ChangeOpsResult, and Wikibase\Repo\ChangeOp\ChangeOpFingerprintResult.

◆ isEntityChanged()

Wikibase\Repo\ChangeOp\ChangeOpResult::isEntityChanged ( )

Whether the entity document was actually changed in any way as a result of applying the change op to it.

Returns
bool

Implemented in Wikibase\Repo\ChangeOp\GenericChangeOpResult, Wikibase\Repo\ChangeOp\ChangeOpsResult, and Wikibase\Repo\ChangeOp\ChangeOpFingerprintResult.

◆ validate()

Wikibase\Repo\ChangeOp\ChangeOpResult::validate ( )

Validate a ChangeOpResult.

Mostly suitable for validations that need to run only on the parts that have been actually changed on an entity. Example of those are expensive validations that need to run on db or other external slower types of stores.

For simpler and less-expensive validations, ChangeOp::validate can be used as well.

Concrete example: Checking for uniqueness of terms (fingerprint) across the store is an expensive operation. It better be checked only on terms that are actually going to change on entity, rather than validate uniqueness on all terms including the ones that are not changed.

Returns
Result

Implemented in Wikibase\Repo\ChangeOp\GenericChangeOpResult, Wikibase\Repo\ChangeOp\ChangeOpsResult, and Wikibase\Repo\ChangeOp\ChangeOpFingerprintResult.


The documentation for this interface was generated from the following file: