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

Public Member Functions

 __construct (Store $store)
 
 computeTableRowDiffFor ($sid, SemanticData $semanticData)
 
 resetCompositePropertyTableDiff ()
 
 getCompositePropertyTableDiff ()
 

Detailed Description

GNU GPL v2+

Since
2.3
Author
Markus Krötzsch
Nischay Nahata
mwjames

Constructor & Destructor Documentation

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

Member Function Documentation

SMW\SQLStore\PropertyTableRowDiffer::computeTableRowDiffFor (   $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
SMW\SQLStore\PropertyTableRowDiffer::getCompositePropertyTableDiff ( )
SMW\SQLStore\PropertyTableRowDiffer::resetCompositePropertyTableDiff ( )
Since
2.3

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