Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SMW\SQLStore\EntityStore\PrefetchItemLookup Class Reference

Public Member Functions

 __construct (Store $store, CachingSemanticDataLookup $semanticDataLookup, PropertySubjectsLookup $propertySubjectsLookup, LinkBatch $linkBatch=null, SequenceMap $sequenceMap=null)
 
 getPropertyValues (array $subjects, DIProperty $property, RequestOptions $requestOptions)
 

Public Attributes

const HASH_INDEX = 'hash.index'
 

Detailed Description

Prefetch values for a list of known subjects to a specific property to avoid using Store::getPropertyValues for each single subject request.

It makes use of a "bulk" request by taking advantage of the WHERE IN construct to reduce the amount FETCH (aka SELECT) queries by retrieving values for a specific property and a list of subjects.

The raw result list is encoded by a hash and is required to be split by this class to match the correct DataItem representation for a specific subject in list of subjects.

GNU GPL v2+

Since
3.1
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\SQLStore\EntityStore\PrefetchItemLookup::__construct ( Store  $store,
CachingSemanticDataLookup  $semanticDataLookup,
PropertySubjectsLookup  $propertySubjectsLookup,
LinkBatch  $linkBatch = null,
SequenceMap  $sequenceMap = null 
)
Since
3.1
Parameters
Store$store
CachingSemanticDataLookup$semanticDataLookup
PropertySubjectsLookup$propertySubjectsLookup
LinkBatch | null$LinkBatch
SequenceMap | null$sequenceMap

Member Function Documentation

◆ getPropertyValues()

SMW\SQLStore\EntityStore\PrefetchItemLookup::getPropertyValues ( array  $subjects,
DIProperty  $property,
RequestOptions  $requestOptions 
)
Since
3.1
Parameters
array$subjects
DIProperty$property
RequestOptions$requestOptions
Returns
[]

Member Data Documentation

◆ HASH_INDEX

const SMW\SQLStore\EntityStore\PrefetchItemLookup::HASH_INDEX = 'hash.index'

Uses the item hash as index instead of the default ID based index.


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

About | General disclaimer | Privacy policy