Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\SQLStore\Lookup\MonolingualTextLookup Class Reference

Public Member Functions

 __construct (Store $store)
 
 clearLookupCache ()
 
 setCaller ( $caller)
 
 newDIContainer (DIWikiPage $subject, DIProperty $property, $languageCode=null)
 
 newDataValue (DIWikiPage $subject, DIProperty $property, $languageCode=null)
 
 fetchFromTable (DIWikiPage $subject, DIProperty $property, $languageCode=null)
 

Detailed Description

GNU GPL v2+

Since
3.1
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\SQLStore\Lookup\MonolingualTextLookup::__construct ( Store  $store)
Since
3.1
Parameters
Store$store

Member Function Documentation

◆ clearLookupCache()

SMW\SQLStore\Lookup\MonolingualTextLookup::clearLookupCache ( )
Since
3.1

◆ fetchFromTable()

SMW\SQLStore\Lookup\MonolingualTextLookup::fetchFromTable ( DIWikiPage  $subject,
DIProperty  $property,
  $languageCode = null 
)
Since
3.1
Parameters
DIWikiPage$subject
Returns
[]

This method avoids access to Store::getSemanticData in order to optimize the query and produce something like:

In case of a _ML... reference use the o_id (object) field

SELECT t0.o_id AS id, o0.smw_title AS v0, o0.smw_namespace AS v1, o0.smw_iw AS v2, o0.smw_subobject AS v3, t2.o_hash AS text_short, t2.o_blob AS text_long, t3.o_hash AS lcode FROM smw_di_wikipage AS t0 INNER JOIN smw_object_ids AS t1 ON t0.p_id=t1.smw_id INNER JOIN smw_object_ids AS o0 ON t0.o_id=o0.smw_id INNER JOIN smw_fpt_text AS t2 ON t2.s_id=o0.smw_id INNER JOIN smw_fpt_lcode AS t3 ON t3.s_id=o0.smw_id WHERE (t0.o_id='364192') AND (t0.p_id='195233') AND (o0.smw_iw!=':smw') AND (o0.smw_iw!=':smw-delete')

◆ newDataValue()

SMW\SQLStore\Lookup\MonolingualTextLookup::newDataValue ( DIWikiPage  $subject,
DIProperty  $property,
  $languageCode = null 
)
Since
3.1
Parameters
DIWikiPage$subject
Returns
[]

◆ newDIContainer()

SMW\SQLStore\Lookup\MonolingualTextLookup::newDIContainer ( DIWikiPage  $subject,
DIProperty  $property,
  $languageCode = null 
)
Since
3.1
Parameters
DIWikiPage$subject
Returns
DIContainer|null

◆ setCaller()

SMW\SQLStore\Lookup\MonolingualTextLookup::setCaller (   $caller)
Since
3.1
Parameters
string$caller

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

About | General disclaimer | Privacy policy