Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SMWSQLStore3 Class Reference
Inheritance diagram for SMWSQLStore3:
Inheritance graph
[legend]
Collaboration diagram for SMWSQLStore3:
Collaboration graph
[legend]

Public Member Functions

 __construct ()
 
 getDataItemHandlerForDIType ( $diType)
 
 getSemanticData (DIWikiPage $subject, $filter=false)
 
 getPropertyValues ( $subject, DIProperty $property, $requestOptions=null)
 
 getProperties (DIWikiPage $subject, $requestOptions=null)
 
 getPropertySubjects (DIProperty $property, $dataItem, $requestOptions=null)
 
 getAllPropertySubjects (DIProperty $property, $requestoptions=null)
 
 getInProperties (SMWDataItem $value, $requestoptions=null)
 
 getWriter ()
 
 deleteSubject (Title $title)
 
 changeTitle (Title $oldTitle, Title $newTitle, $pageId, $redirectId=0)
 
 getQueryResult (SMWQuery $query)
 
 getPropertiesSpecial ( $requestOptions=null)
 
 getUnusedPropertiesSpecial ( $requestOptions=null)
 
 getWantedPropertiesSpecial ( $requestOptions=null)
 
 getStatistics ()
 
 service ( $service,... $args)
 
 setup ( $verbose=true)
 
 drop ( $verbose=true)
 
 refreshData (&$id, $count, $namespaces=false, $usejobs=true)
 
 refreshConceptCache (Title $concept)
 
 deleteConceptCache ( $concept)
 
 getConceptCacheStatus ( $concept)
 
 getSQLOptions (SMWRequestOptions $requestOptions=null, $valueCol='')
 
 getSQLConditions (SMWRequestOptions $requestOptions=null, $valueCol='', $labelCol='', $addAnd=true)
 
 applyRequestOptions (array $data, SMWRequestOptions $requestOptions=null)
 
 findTypeTableId ( $typeid)
 
 findDiTypeTableId ( $dataItemId)
 
 findPropertyTableID (DIProperty $property)
 
 getPropertyTables ()
 
 getObjectIds ()
 
 getStatisticsTable ()
 
 clear ()
 
 getInfo ( $type=null)
 
 getConnection ( $type='mw.db')
 
 getPropertyTableInfoFetcher ()
 
 getPropertyTableIdReferenceFinder ()
 
- Public Member Functions inherited from SMW\Store
 getSemanticData (DIWikiPage $subject, $filter=false)
 
 getPropertyValues ( $subject, DIProperty $property, $requestoptions=null)
 
 getPropertySubjects (DIProperty $property, $value, $requestoptions=null)
 
 getAllPropertySubjects (DIProperty $property, $requestoptions=null)
 
 getProperties (DIWikiPage $subject, $requestOptions=null)
 
 getInProperties (DataItem $object, $requestoptions=null)
 
 getWikiPageSortKey (DIWikiPage $dataItem)
 
 getRedirectTarget (DataItem $dataItem)
 
 deleteSubject (Title $subject)
 
 updateData (SemanticData $semanticData)
 
 clearData (DIWikiPage $di)
 
 changeTitle (Title $oldtitle, Title $newtitle, $pageid, $redirid=0)
 
 getQueryResult (SMWQuery $query)
 
 getPropertiesSpecial ( $requestoptions=null)
 
 getUnusedPropertiesSpecial ( $requestoptions=null)
 
 getWantedPropertiesSpecial ( $requestoptions=null)
 
 getStatistics ()
 
 service ( $service,... $args)
 
 setup ( $verbose=true)
 
 drop ( $verbose=true)
 
 refreshData (&$index, $count, $namespaces=false, $usejobs=true)
 
 getOptions ()
 
 setOption ( $key, $value)
 
 getOption ( $key, $default=null)
 
 clear ()
 
 getInfo ( $type=null)
 
 setConnectionManager (ConnectionManager $connectionManager)
 
 getConnection ( $type)
 
- Public Member Functions inherited from SMW\QueryEngine
 getQueryResult (Query $query)
 

Public Attributes

const FIXED_PROPERTY_ID_UPPERBOUND = 500
 
const CONCEPT_CACHE_TABLE = 'smw_concept_cache'
 
const CONCEPT_TABLE = 'smw_fpt_conc'
 
const PROPERTY_STATISTICS_TABLE = 'smw_prop_stats'
 
const QUERY_LINKS_TABLE = 'smw_query_links'
 
const FT_SEARCH_TABLE = 'smw_ft_search'
 
const ID_TABLE = 'smw_object_ids'
 
 $smwIds
 
- Public Attributes inherited from SMW\Store
const OPT_CREATE_UPDATE_JOB = 'opt.create.update.job'
 

Protected Member Functions

 doDataUpdate (SemanticData $semanticData)
 
 fetchQueryResult (SMWQuery $query)
 
 newServicesContainer ()
 
- Protected Member Functions inherited from SMW\Store
 doDataUpdate (SemanticData $data)
 
 fetchQueryResult (SMWQuery $query)
 

Protected Attributes

 $servicesContainer
 
 $writer = false
 
- Protected Attributes inherited from SMW\Store
 $connectionManager = null
 
 $options = null
 

Additional Inherited Members

- Static Public Member Functions inherited from SMW\Store
static setupStore ( $verbose=true, $options=null)
 

Detailed Description

Storage access class for using the standard MediaWiki SQL database for keeping semantic data.

Note
Regarding the use of interwiki links in the store, there is currently no support for storing semantic data about interwiki objects, and hence queries that involve interwiki objects really make sense only for them occurring in object positions. Most methods still use the given input interwiki text as a simple way to filter out results that may be found if an interwiki object is given but a local object of the same name exists. It is currently not planned to support things like interwiki reuse of properties.
Since
1.8

Constructor & Destructor Documentation

◆ __construct()

SMWSQLStore3::__construct ( )
Since
1.8

Member Function Documentation

◆ applyRequestOptions()

SMWSQLStore3::applyRequestOptions ( array  $data,
SMWRequestOptions  $requestOptions = null 
)
See also
RequestOptionsProc::applyRequestOptions
Since
1.8
Parameters
array$dataarray of SMWDataItem objects
SMWRequestOptions | null$requestOptions
Returns
SMWDataItem[]

◆ clear()

SMWSQLStore3::clear ( )

Resets internal objects

Since
1.9.1.1

◆ deleteConceptCache()

SMWSQLStore3::deleteConceptCache (   $concept)

Delete the concept cache for the given concept.

Since
1.8
Parameters
Title$concept

◆ drop()

SMWSQLStore3::drop (   $verbose = true)
Since
1.8

◆ findDiTypeTableId()

SMWSQLStore3::findDiTypeTableId (   $dataItemId)

PropertyTableInfoFetcher::findTableIdForDataItemTypeId

Parameters
integer$dataItemId
Returns
string

◆ findPropertyTableID()

SMWSQLStore3::findPropertyTableID ( DIProperty  $property)

PropertyTableInfoFetcher::findTableIdForProperty

Parameters
DIProperty$property
Returns
string

◆ findTypeTableId()

SMWSQLStore3::findTypeTableId (   $typeid)

PropertyTableInfoFetcher::findTableIdForDataTypeTypeId

Parameters
string$typeid
Returns
string

◆ getAllPropertySubjects()

SMWSQLStore3::getAllPropertySubjects ( DIProperty  $property,
  $requestoptions = null 
)
See also
EntityLookup::getAllPropertySubjects

◆ getConceptCacheStatus()

SMWSQLStore3::getConceptCacheStatus (   $concept)

Return status of the concept cache for the given concept as an array with key 'status' ('empty': not cached, 'full': cached, 'no': not cacheable). If status is not 'no', the array also contains keys 'size' (query size), 'depth' (query depth), 'features' (query features). If status is 'full', the array also contains keys 'date' (timestamp of cache), 'count' (number of results in cache).

Since
1.8
Parameters
Title | SMWWikiPageValue$concept
Returns
DIConcept|null

◆ getConnection()

SMWSQLStore3::getConnection (   $type = 'mw.db')
Since
2.1
Parameters
string$type
Returns
Database

◆ getDataItemHandlerForDIType()

SMWSQLStore3::getDataItemHandlerForDIType (   $diType)

Get an object of the dataitem handler from the dataitem provided.

Since
1.8
Parameters
integer$diType
Returns
SMWDIHandler
Exceptions
RuntimeExceptionif no handler exists for the given type

◆ getInfo()

SMWSQLStore3::getInfo (   $type = null)
Since
3.0
Parameters
string | null$type
Returns
array

◆ getInProperties()

SMWSQLStore3::getInProperties ( SMWDataItem  $value,
  $requestoptions = null 
)
See also
EntityLookup::getInProperties

◆ getObjectIds()

SMWSQLStore3::getObjectIds ( )

Returns SMW Id object

Since
1.9
Returns
SMWSql3SmwIds

◆ getProperties()

SMWSQLStore3::getProperties ( DIWikiPage  $subject,
  $requestOptions = null 
)
See also
EntityLookup::getProperties

◆ getPropertiesSpecial()

SMWSQLStore3::getPropertiesSpecial (   $requestOptions = null)
Parameters
RequestOptions | null$requestOptions
Returns
CachedListLookup

◆ getPropertySubjects()

SMWSQLStore3::getPropertySubjects ( DIProperty  $property,
  $dataItem,
  $requestOptions = null 
)
See also
EntityLookup::getPropertySubjects

◆ getPropertyTableIdReferenceFinder()

SMWSQLStore3::getPropertyTableIdReferenceFinder ( )
Since
2.4
Returns
PropertyTableIdReferenceFinder

◆ getPropertyTableInfoFetcher()

SMWSQLStore3::getPropertyTableInfoFetcher ( )
Since
2.2
Returns
PropertyTableInfoFetcher

◆ getPropertyTables()

SMWSQLStore3::getPropertyTables ( )

PropertyTableInfoFetcher::getPropertyTableDefinitions

Returns
TableDefinition[]

◆ getPropertyValues()

SMWSQLStore3::getPropertyValues (   $subject,
DIProperty  $property,
  $requestOptions = null 
)
See also
EntityLookup::getPropertyValues

◆ getQueryResult()

SMWSQLStore3::getQueryResult ( SMWQuery  $query)
Note
Move hooks to the base class in 3.*
See also
SMWStore::fetchQueryResult
Since
1.8
Parameters
SMWQuery$query
Returns
SMWQueryResult|string|integer depends on $query->querymode

◆ getSemanticData()

SMWSQLStore3::getSemanticData ( DIWikiPage  $subject,
  $filter = false 
)
See also
EntityLookup::getSemanticData

◆ getSQLConditions()

SMWSQLStore3::getSQLConditions ( SMWRequestOptions  $requestOptions = null,
  $valueCol = '',
  $labelCol = '',
  $addAnd = true 
)
See also
RequestOptionsProc::getSQLConditions
Since
1.8
Parameters
SMWRequestOptions | null$requestOptions
string$valueColname of SQL column to which conditions apply
string$labelColname of SQL column to which string conditions apply, if any
boolean$addAndindicate whether the string should begin with " AND " if non-empty
Returns
string

◆ getSQLOptions()

SMWSQLStore3::getSQLOptions ( SMWRequestOptions  $requestOptions = null,
  $valueCol = '' 
)
See also
RequestOptionsProc::getSQLOptions
Since
1.8
Parameters
SMWRequestOptions | null$requestOptions
string$valuecol
Returns
array

◆ getStatisticsTable()

SMWSQLStore3::getStatisticsTable ( )

Returns the statics table

Since
1.9
Returns
string

◆ getUnusedPropertiesSpecial()

SMWSQLStore3::getUnusedPropertiesSpecial (   $requestOptions = null)
Parameters
RequestOptions | null$requestOptions
Returns
CachedListLookup

◆ getWantedPropertiesSpecial()

SMWSQLStore3::getWantedPropertiesSpecial (   $requestOptions = null)
Parameters
RequestOptions | null$requestOptions
Returns
CachedListLookup

◆ newServicesContainer()

SMWSQLStore3::newServicesContainer ( )
protected
Returns
ServicesContainer

◆ refreshConceptCache()

SMWSQLStore3::refreshConceptCache ( Title  $concept)

Refresh the concept cache for the given concept.

Since
1.8
Parameters
Title$concept
Returns
array of error strings (empty if no errors occurred)

◆ service()

SMWSQLStore3::service (   $service,
  $args 
)
See also
Store::service

◆ setup()

SMWSQLStore3::setup (   $verbose = true)
Since
1.8

Member Data Documentation

◆ CONCEPT_CACHE_TABLE

const SMWSQLStore3::CONCEPT_CACHE_TABLE = 'smw_concept_cache'

Name of the table to store the concept cache in.

Note
This should never change. If it is changed, the concept caches will appear empty until they are recomputed.

◆ FIXED_PROPERTY_ID_UPPERBOUND

const SMWSQLStore3::FIXED_PROPERTY_ID_UPPERBOUND = 500

Specifies the border limit (upper bound) for pre-defined properties used in the ID_TABLE

When changing the upper bound, please make sure to copy the current upper bound as legacy to the TableIntegrityExaminer::checkOnPostCreation

◆ FT_SEARCH_TABLE

const SMWSQLStore3::FT_SEARCH_TABLE = 'smw_ft_search'

Name of the table that manages the fulltext index

◆ ID_TABLE

const SMWSQLStore3::ID_TABLE = 'smw_object_ids'

Name of the table that manages the Store IDs

◆ PROPERTY_STATISTICS_TABLE

const SMWSQLStore3::PROPERTY_STATISTICS_TABLE = 'smw_prop_stats'

Name of the table to store the concept cache in.

Note
This should never change, but if it does then its contents can simply be rebuilt by running the setup.

◆ QUERY_LINKS_TABLE

const SMWSQLStore3::QUERY_LINKS_TABLE = 'smw_query_links'

Name of the table that manages the query dependency links


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

About | General disclaimer | Privacy policy