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

Public Member Functions

 __construct (Store $store, PropertyTableRowMapper $propertyTableRowMapper)
 
 setChangeOp (ChangeOp $changeOp=null)
 
 checkRemnantEntities ( $checkRemnantEntities)
 
 getChangeOp ()
 
 computeTableRowDiff ( $sid, SemanticData $semanticData)
 

Detailed Description

GNU GPL v2+

Since
2.3
Author
Markus Krötzsch
Nischay Nahata
mwjames

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ checkRemnantEntities()

SMW\SQLStore\PropertyTableRowDiffer::checkRemnantEntities (   $checkRemnantEntities)
Since
3.1
Parameters
boolean$checkRemnantEntities

◆ computeTableRowDiff()

SMW\SQLStore\PropertyTableRowDiffer::computeTableRowDiff (   $sid,
SemanticData  $semanticData 
)

Compute necessary insertions, deletions, and new table hashes for updating the database to contain $newData for the subject with ID $sid. Insertions and deletions are returned in as an array mapping table names to arrays of table rows. Each row is an array mapping column names to values as usual. The table hashes are returned as an array mapping table names to hash values.

It is ensured that table names (keys) in the returned insert data are exaclty the same as the table names (keys) in the delete data, even if one of them maps to an empty array (no changes). If a table needs neither insertions nor deletions, then it will not be mentioned as a key anywhere.

The given database is only needed for reading the data that is related assigned to sid.

Since
2.3
Parameters
integer$sid
SemanticData$semanticData
Returns
array

◆ getChangeOp()

SMW\SQLStore\PropertyTableRowDiffer::getChangeOp ( )
Since
3.0
Returns
ChangeOp

◆ setChangeOp()

SMW\SQLStore\PropertyTableRowDiffer::setChangeOp ( ChangeOp  $changeOp = null)
Since
3.0
Parameters
ChangeOp | null$changeOp

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

About | General disclaimer | Privacy policy