Base class for item/property TermStoreWriters.
More...
Base class for item/property TermStoreWriters.
- See also
- Item & Property Terms
- Copyright
- GPL-2.0-or-later
◆ __construct()
◆ acquireAndInsertTerms()
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::acquireAndInsertTerms |
( |
Int32EntityId | $entityId, |
|
|
Fingerprint | $fingerprint ) |
|
private |
Acquire term in lang IDs for the given Fingerprint, store them in the table for the given entity ID, and return term in lang IDs that are no longer referenced and might now need to be cleaned up.
Updating the current state is done on a best effort basis. Because this method is called as a secondary data update, not in the primary transaction, (nearly) simultaneous edits to the same entity can race on the term store update, and the final state does not necessarily correspond to the terms of the latest revision. (In theory, it may even be a mixture of the terms of several revisions, without exactly matching any of them.) However, any future terms update should fix such a situation (any out-of-sync state should not survive through later updates). Additionally, all removed <prefix>_term_in_lang_ids will always be accurately reported: we will never silently remove a reference to the wbt_term_in_lang table.
- Parameters
-
Int32EntityId | $entityId | |
Fingerprint | $fingerprint | |
- Returns
- int[] <prefix>term_in_lang_ids that we removed (references to the wbt_term_in_lang table). The returned term in lang IDs might still be used in other wbt<entity>_terms rows, in case of a race condition potentially even on the same entity. This should be checked just before cleanup. However, that may happen in a different transaction than this call.
◆ delete()
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::delete |
( |
Int32EntityId | $entityId | ) |
|
|
protected |
◆ deleteTermsWithoutClean()
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::deleteTermsWithoutClean |
( |
Int32EntityId | $entityId | ) |
|
|
private |
Delete rows for the given Int32EntityId, and return term in lang IDs that are no longer referenced and might now need to be cleaned up.
(The returned term in lang IDs might still be used in wbt_<entity>_terms rows for other entity IDs, and this should be checked just before cleanup. However, that may happen in a different transaction than this call.)
- Parameters
-
- Returns
- int[]
◆ getDbw()
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::getDbw |
( |
| ) |
|
|
private |
◆ store()
◆ submitJobToCleanTermStorageRowsIfUnused()
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::submitJobToCleanTermStorageRowsIfUnused |
( |
array | $termInLangIdsToClean | ) |
|
|
private |
◆ $jobQueueGroup
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::$jobQueueGroup |
|
private |
◆ $stringNormalizer
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::$stringNormalizer |
|
private |
◆ $termInLangIdsAcquirer
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::$termInLangIdsAcquirer |
|
private |
◆ $termInLangIdsResolver
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::$termInLangIdsResolver |
|
private |
◆ $termsDb
Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::$termsDb |
|
private |
The documentation for this class was generated from the following file: