Index: trunk/extensions/Wikidata/OmegaWiki/RecordSetQueries.php |
— | — | @@ -1,6 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -function getTransactedSQL($transactionInformation, $selectFields, $table, $restrictions, $orderBy = array(), $count = -1, $offset = 0) { |
| 4 | +require_once('Transaction.php'); |
| 5 | + |
| 6 | +function getTransactedSQL(QueryTransactionInformation $transactionInformation, array $selectFields, Table $table, array $restrictions, array $orderBy = array(), $count = -1, $offset = 0) { |
5 | 7 | $tableNames = array($table->identifier); |
6 | 8 | |
7 | 9 | if ($table->isVersioned) { |
— | — | @@ -32,7 +34,7 @@ |
33 | 35 | return $query; |
34 | 36 | } |
35 | 37 | |
36 | | -function queryRecordSet($recordSetStructureId, QueryTransactionInformation $transactionInformation, Attribute $keyAttribute, $fieldAttributeMapping, Table $table, $restrictions, $orderBy = array(), $count = -1, $offset = 0) { |
| 38 | +function queryRecordSet($recordSetStructureId, QueryTransactionInformation $transactionInformation, Attribute $keyAttribute, array $fieldAttributeMapping, Table $table, array $restrictions, array $orderBy = array(), $count = -1, $offset = 0) { |
37 | 39 | $dbr =& wfGetDB(DB_SLAVE); |
38 | 40 | |
39 | 41 | $selectFields = array_keys($fieldAttributeMapping); |
— | — | @@ -66,7 +68,7 @@ |
67 | 69 | return $recordSet; |
68 | 70 | } |
69 | 71 | |
70 | | -function getUniqueIdsInRecordSet($recordSet, $idAttributes) { |
| 72 | +function getUniqueIdsInRecordSet(RecordSet $recordSet, array $idAttributes) { |
71 | 73 | $ids = array(); |
72 | 74 | |
73 | 75 | for ($i = 0; $i < $recordSet->getRecordCount(); $i++) { |