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

Public Member Functions

 __construct (Store $store)
 
 newChangeOp ( $id, SemanticData $semanticData)
 
 mapToRows ( $sid, SemanticData $semanticData)
 
 makeHash (array $array)
 

Detailed Description

Builds a table row representation for a SemanticData object.

GNU GPL v2+

Since
3.0
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\SQLStore\PropertyTableRowMapper::__construct ( Store  $store)
Since
2.3
Parameters
Store$store

Member Function Documentation

◆ makeHash()

SMW\SQLStore\PropertyTableRowMapper::makeHash ( array  $array)

Create a string key for hashing an array of values that represents a row in the database. Used to eliminate duplicates and to support diff computation. This is not stored in the database, so it can be changed without causing any problems with legacy data.

Since
3.0
Parameters
array$fieldArray
Returns
string

◆ mapToRows()

SMW\SQLStore\PropertyTableRowMapper::mapToRows (   $sid,
SemanticData  $semanticData 
)

Create an array of rows to insert into property tables in order to store the given SemanticData. The given $sid (subject page id) is used directly and must belong to the subject of the data container. Sortkeys are ignored since they are not stored in a property table but in the ID table.

The returned array uses property table names as keys and arrays of table rows as values. Each table row is an array mapping column names to values.

Note
Property tables that do not use ids as subjects are ignored. This just excludes redirects that are handled differently anyway; it would not make a difference to include them here.
Since
3.0
Parameters
integer$sid
SemanticData$semanticData
Returns
array

◆ newChangeOp()

SMW\SQLStore\PropertyTableRowMapper::newChangeOp (   $id,
SemanticData  $semanticData 
)
Since
3.0
Parameters
integer$id
SemanticData$semanticData
Returns
ChangeOp

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

About | General disclaimer | Privacy policy