r25983 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25982‎ | r25983 | r25984 >
Date:12:32, 21 September 2007
Author:proes
Status:old
Tags:
Comment:
* Introduced WikiDataSet that encapsulates a set of wiki data tables including their prefixes.
* Removed $xxxTable globals from WikiDataTables.php, replaced by one $dataSet global
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataTables.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
@@ -412,18 +412,18 @@
413413
414414 function getSQLForLevels($language="<ANY>") {
415415 global
416 - $definedMeaningTable, $expressionTable, $bootstrappedDefinedMeaningsTable, $classAttributeLevels;
 416+ $classAttributeLevels, $dataSet;
417417
418418 $o=OmegaWikiAttributes::getInstance();
419419 // TO DO: Add support for multiple languages here
420420 return
421421 selectLatest(
422 - array($bootstrappedDefinedMeaningsTable->definedMeaningId, $expressionTable->spelling),
423 - array($definedMeaningTable, $expressionTable, $bootstrappedDefinedMeaningsTable),
 422+ array($dataSet->bootstrappedDefinedMeanings->definedMeaningId, $dataSet->expression->spelling),
 423+ array($dataSet->definedMeaning, $dataSet->expression, $dataSet->bootstrappedDefinedMeanings),
424424 array(
425425 'name IN (' . implodeFixed($classAttributeLevels) . ')',
426 - equals($definedMeaningTable->definedMeaningId, $bootstrappedDefinedMeaningsTable->definedMeaningId),
427 - equals($definedMeaningTable->expressionId, $expressionTable->expressionId)
 426+ equals($dataSet->definedMeaning->definedMeaningId, $dataSet->bootstrappedDefinedMeanings->definedMeaningId),
 427+ equals($dataSet->definedMeaning->expressionId, $dataSet->expression->expressionId)
428428 )
429429 );
430430 }
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php
@@ -344,11 +344,10 @@
345345 }
346346
347347 function getTransactionRecordSet($fromTransactionId, $transactionCount, $userName) {
348 -
349 - $o=OmegaWikiAttributes::getInstance();
350348 global
351 - $transactionsTable;
 349+ $dataSet;
352350
 351+ $o=OmegaWikiAttributes::getInstance();
353352 $dc=wdGetDataSetContext();
354353 $queryTransactionInformation = new QueryLatestTransactionInformation();
355354
@@ -364,7 +363,7 @@
365364 new TableColumnsToAttributesMapping(
366365 new TableColumnsToAttribute(array('transaction_id'), $o->transactionId)
367366 ),
368 - $transactionsTable,
 367+ $dataSet->transactions,
369368 $restrictions,
370369 array('transaction_id DESC'),
371370 $transactionCount
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php
@@ -1452,28 +1452,27 @@
14531453 $dbr =& wfGetDB(DB_SLAVE);
14541454
14551455 global
1456 - $wgDefaultClassMids,
1457 - $classAttributesTable, $bootstrappedDefinedMeaningsTable, $classMembershipsTable;
 1456+ $wgDefaultClassMids, $dataSet;
14581457
14591458 $queryResult = $dbr->query(
14601459 SelectLatestDistinct(
14611460 array(
1462 - $classAttributesTable->attributeMid,
1463 - $classAttributesTable->attributeType,
1464 - $bootstrappedDefinedMeaningsTable->name
 1461+ $dataSet->classAttributes->attributeMid,
 1462+ $dataSet->classAttributes->attributeType,
 1463+ $dataSet->bootstrappedDefinedMeanings->name
14651464 ),
1466 - array($classAttributesTable, $bootstrappedDefinedMeaningsTable),
 1465+ array($dataSet->classAttributes, $dataSet->bootstrappedDefinedMeanings),
14671466 array(
1468 - equals($classAttributesTable->levelMid, $bootstrappedDefinedMeaningsTable->definedMeaningId),
 1467+ equals($dataSet->classAttributes->levelMid, $dataSet->bootstrappedDefinedMeanings->definedMeaningId),
14691468 sqlOr(
1470 - in($classAttributesTable->classMid,
 1469+ in($dataSet->classAttributes->classMid,
14711470 selectLatest(
1472 - array($classMembershipsTable->classMid),
1473 - array($classMembershipsTable),
1474 - array(equals($classMembershipsTable->classMemberMid, $definedMeaningId))
 1471+ array($dataSet->classMemberships->classMid),
 1472+ array($dataSet->classMemberships),
 1473+ array(equals($dataSet->classMemberships->classMemberMid, $definedMeaningId))
14751474 )
14761475 ),
1477 - inArray($classAttributesTable->classMid, $wgDefaultClassMids)
 1476+ inArray($dataSet->classAttributes->classMid, $wgDefaultClassMids)
14781477 )
14791478 )
14801479 )
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php
@@ -83,8 +83,6 @@
8484
8585 function fetchDefinedMeaningReferenceRecords($sql, array &$definedMeaningIds, array &$definedMeaningReferenceRecords, $usedAs='defined-meaning') {
8686 $dc=wdGetDataSetContext();
87 -
88 -
8987 $o=OmegaWikiAttributes::getInstance();
9088
9189 $foundDefinedMeaningIds = array();
@@ -255,7 +253,6 @@
256254 }
257255
258256 function getExpressionReferenceRecords($expressionIds) {
259 -
260257 $o=OmegaWikiAttributes::getInstance();
261258 $dc=wdGetDataSetContext();
262259
@@ -397,7 +394,6 @@
398395 }
399396
400397 function getExpressionMeaningsRecordSet($expressionId, $exactMeaning, ViewInformation $viewInformation) {
401 -
402398 $o=OmegaWikiAttributes::getInstance();
403399
404400 $dc=wdGetDataSetContext();
@@ -428,7 +424,6 @@
429425 }
430426
431427 function getExpressionMeaningsRecord($expressionId, ViewInformation $viewInformation) {
432 -
433428 $o=OmegaWikiAttributes::getInstance();
434429
435430 $record = new ArrayRecord($o->expressionMeaningsStructure);
@@ -439,7 +434,6 @@
440435 }
441436
442437 function getExpressionsRecordSet($spelling, ViewInformation $viewInformation, $dc=null) {
443 -
444438 $dc=wdGetDataSetContext($dc);
445439 $o=OmegaWikiAttributes::getInstance();
446440
@@ -503,10 +497,10 @@
504498
505499
506500 function getClassAttributesRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 501+ global
 502+ $dataSet;
507503
508504 $o=OmegaWikiAttributes::getInstance();
509 - global
510 - $classAttributesTable;
511505
512506 $recordSet = queryRecordSet(
513507 $o->classAttributesStructure->getStructureType(),
@@ -518,7 +512,7 @@
519513 new TableColumnsToAttribute(array('attribute_mid'), $o->classAttributeAttribute),
520514 new TableColumnsToAttribute(array('attribute_type'),$o->classAttributeType)
521515 ),
522 - $classAttributesTable,
 516+ $dataSet->classAttributes,
523517 array("class_mid=$definedMeaningId")
524518 );
525519
@@ -540,10 +534,10 @@
541535 }
542536
543537 function getAlternativeDefinitionsRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 538+ global
 539+ $dataSet;
544540
545541 $o=OmegaWikiAttributes::getInstance();
546 - global
547 - $alternativeDefinitionsTable;
548542
549543 $recordSet = queryRecordSet(
550544 $o->alternativeDefinitionsStructure->getStructureType(),
@@ -553,7 +547,7 @@
554548 new TableColumnsToAttribute(array('meaning_text_tcid'), $o->definitionId),
555549 new TableColumnsToAttribute(array('source_id'), $o->source)
556550 ),
557 - $alternativeDefinitionsTable,
 551+ $dataSet->alternativeDefinitions,
558552 array("meaning_mid=$definedMeaningId")
559553 );
560554
@@ -566,7 +560,6 @@
567561 }
568562
569563 function getDefinedMeaningDefinitionRecord($definedMeaningId, ViewInformation $viewInformation) {
570 -
571564 $o=OmegaWikiAttributes::getInstance();
572565
573566 $definitionId = getDefinedMeaningDefinitionId($definedMeaningId);
@@ -697,7 +690,7 @@
698691
699692 function getTranslatedContentRecordSet($translatedContentId, ViewInformation $viewInformation) {
700693 global
701 - $translatedContentTable;
 694+ $dataSet;
702695
703696 $o=OmegaWikiAttributes::getInstance();
704697
@@ -709,7 +702,7 @@
710703 new TableColumnsToAttribute(array('language_id'), $o->language),
711704 new TableColumnsToAttribute(array('text_id'), $o->text)
712705 ),
713 - $translatedContentTable,
 706+ $dataSet->translatedContent,
714707 array("translated_content_id=$translatedContentId")
715708 );
716709
@@ -720,7 +713,7 @@
721714
722715 function getFilteredTranslatedContentRecordSet($translatedContentId, ViewInformation $viewInformation) {
723716 global
724 - $translatedContentTable;
 717+ $dataSet;
725718
726719 $o=OmegaWikiAttributes::getInstance();
727720
@@ -732,7 +725,7 @@
733726 new TableColumnsToAttribute(array('language_id'), $o->language),
734727 new TableColumnsToAttribute(array('text_id'), $o->text)
735728 ),
736 - $translatedContentTable,
 729+ $dataSet->translatedContent,
737730 array(
738731 "translated_content_id=$translatedContentId",
739732 "language_id=" . $viewInformation->filterLanguageId
@@ -745,12 +738,12 @@
746739 }
747740
748741 function getSynonymAndTranslationRecordSet($definedMeaningId, ViewInformation $viewInformation) {
749 -
750 - $o=OmegaWikiAttributes::getInstance();
751742 global
752 - $syntransTable;
 743+ $dataSet;
753744
 745+ $o=OmegaWikiAttributes::getInstance();
754746 $dc=wdGetDataSetContext();
 747+
755748 $restrictions = array("defined_meaning_id=$definedMeaningId");
756749 if ($viewInformation->filterLanguageId != 0)
757750 $restrictions[] =
@@ -771,7 +764,7 @@
772765 new TableColumnsToAttribute(array('expression_id'), $o->expression),
773766 new TableColumnsToAttribute(array('identical_meaning'),$o->identicalMeaning)
774767 ),
775 - $syntransTable,
 768+ $dataSet->syntrans,
776769 $restrictions
777770 );
778771
@@ -785,7 +778,6 @@
786779 }
787780
788781 function expandObjectAttributesAttribute(RecordSet $recordSet, Attribute $attributeToExpand, Attribute $objectIdAttribute, ViewInformation $viewInformation) {
789 -
790782 $o=OmegaWikiAttributes::getInstance();
791783
792784 $recordSetStructure = $recordSet->getStructure();
@@ -904,7 +896,6 @@
905897 }
906898
907899 function getDefinedMeaningReferenceRecord($definedMeaningId) {
908 -
909900 $o=OmegaWikiAttributes::getInstance();
910901
911902 $record = new ArrayRecord($o->definedMeaningReferenceStructure);
@@ -917,7 +908,7 @@
918909
919910 function getDefinedMeaningAttributeValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
920911 global
921 - $meaningRelationsTable;
 912+ $dataSet;
922913
923914 $o=OmegaWikiAttributes::getInstance();
924915
@@ -930,7 +921,7 @@
931922 new TableColumnsToAttribute(array('relationtype_mid'), $o->relationType),
932923 new TableColumnsToAttribute(array('meaning2_mid'), $o->otherDefinedMeaning)
933924 ),
934 - $meaningRelationsTable,
 925+ $dataSet->meaningRelations,
935926 array("meaning1_mid IN (" . implode(", ", $objectIds) . ")"),
936927 array('add_transaction_id')
937928 );
@@ -942,11 +933,10 @@
943934 }
944935
945936 function getDefinedMeaningReciprocalRelationsRecordSet($definedMeaningId, ViewInformation $viewInformation) {
946 -
947 - $o=OmegaWikiAttributes::getInstance();
948937 global
949 - $meaningRelationsTable;
 938+ $dataSet;
950939
 940+ $o=OmegaWikiAttributes::getInstance();
951941 $recordSet = queryRecordSet(
952942 $o->reciprocalRelations->id,
953943 $viewInformation->queryTransactionInformation,
@@ -956,7 +946,7 @@
957947 new TableColumnsToAttribute(array('relationtype_mid'), $o->relationType),
958948 new TableColumnsToAttribute(array('meaning1_mid'), $o->otherDefinedMeaning)
959949 ),
960 - $meaningRelationsTable,
 950+ $dataSet->meaningRelations,
961951 array("meaning2_mid=$definedMeaningId"),
962952 array('relationtype_mid')
963953 );
@@ -979,7 +969,7 @@
980970
981971 function getDefinedMeaningCollectionMembershipRecordSet($definedMeaningId, ViewInformation $viewInformation) {
982972 global
983 - $collectionMembershipsTable;
 973+ $dataSet;
984974
985975 $o=OmegaWikiAttributes::getInstance();
986976
@@ -991,7 +981,7 @@
992982 new TableColumnsToAttribute(array('collection_id'), $o->collectionId),
993983 new TableColumnsToAttribute(array('internal_member_id'), $o->sourceIdentifier)
994984 ),
995 - $collectionMembershipsTable,
 985+ $dataSet->collectionMemberships,
996986 array("member_mid=$definedMeaningId")
997987 );
998988
@@ -1011,10 +1001,10 @@
10121002 }
10131003
10141004 function getTextAttributesValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
 1005+ global
 1006+ $dataSet;
10151007
10161008 $o=OmegaWikiAttributes::getInstance();
1017 - global
1018 - $textAttributeValuesTable;
10191009
10201010 $recordSet = queryRecordSet(
10211011 $o->textAttributeValuesStructure->getStructureType(),
@@ -1026,7 +1016,7 @@
10271017 new TableColumnsToAttribute(array('attribute_mid'), $o->textAttribute),
10281018 new TableColumnsToAttribute(array('text'), $o->text)
10291019 ),
1030 - $textAttributeValuesTable,
 1020+ $dataSet->textAttributeValues,
10311021 array("object_id IN (" . implode(", ", $objectIds) . ")")
10321022 );
10331023
@@ -1037,11 +1027,10 @@
10381028 }
10391029
10401030 function getLinkAttributeValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
1041 -
1042 - $o=OmegaWikiAttributes::getInstance();
10431031 global
1044 - $linkAttributeValuesTable;
 1032+ $dataSet;
10451033
 1034+ $o=OmegaWikiAttributes::getInstance();
10461035 $recordSet = queryRecordSet(
10471036 $o->linkAttributeValuesStructure->getStructureType(),
10481037 $viewInformation->queryTransactionInformation,
@@ -1052,7 +1041,7 @@
10531042 new TableColumnsToAttribute(array('attribute_mid'), $o->linkAttribute),
10541043 new TableColumnsToAttribute(array('label', 'url'), $o->link)
10551044 ),
1056 - $linkAttributeValuesTable,
 1045+ $dataSet->linkAttributeValues,
10571046 array("object_id IN (" . implode(", ", $objectIds) . ")")
10581047 );
10591048
@@ -1063,10 +1052,10 @@
10641053 }
10651054
10661055 function getTranslatedTextAttributeValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
 1056+ global
 1057+ $dataSet;
10671058
10681059 $o=OmegaWikiAttributes::getInstance();
1069 - global
1070 - $translatedContentAttributeValuesTable;
10711060
10721061 $recordSet = queryRecordSet(
10731062 $o->translatedTextAttributeValuesStructure->getStructureType(),
@@ -1078,7 +1067,7 @@
10791068 new TableColumnsToAttribute(array('attribute_mid'), $o->translatedTextAttribute),
10801069 new TableColumnsToAttribute(array('value_tcid'), $o->translatedTextValueId)
10811070 ),
1082 - $translatedContentAttributeValuesTable,
 1071+ $dataSet->translatedContentAttributeValues,
10831072 array("object_id IN (" . implode(", ", $objectIds) . ")")
10841073 );
10851074
@@ -1091,10 +1080,8 @@
10921081 }
10931082
10941083 function getOptionAttributeOptionsRecordSet($attributeId, ViewInformation $viewInformation) {
1095 -
1096 - $o=OmegaWikiAttributes::getInstance();
10971084 global
1098 - $optionAttributeOptionsTable;
 1085+ $dataSet;
10991086
11001087 $o=OmegaWikiAttributes::getInstance();
11011088 $recordSet = queryRecordSet(
@@ -1107,7 +1094,7 @@
11081095 new TableColumnsToAttribute(array('option_mid'), $o->optionAttributeOption),
11091096 new TableColumnsToAttribute(array('language_id'), $o->language)
11101097 ),
1111 - $optionAttributeOptionsTable,
 1098+ $dataSet->optionAttributeOptions,
11121099 array('attribute_id = ' . $attributeId)
11131100 );
11141101
@@ -1117,11 +1104,10 @@
11181105 }
11191106
11201107 function getOptionAttributeValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
1121 -
1122 - $o=OmegaWikiAttributes::getInstance();
11231108 global
1124 - $optionAttributeValuesTable;
 1109+ $dataSet;
11251110
 1111+ $o=OmegaWikiAttributes::getInstance();
11261112 $recordSet = queryRecordSet(
11271113 $o->optionAttributeValuesStructure->getStructureType(),
11281114 $viewInformation->queryTransactionInformation,
@@ -1131,7 +1117,7 @@
11321118 new TableColumnsToAttribute(array('object_id'), $o->optionAttributeObject),
11331119 new TableColumnsToAttribute(array('option_id'), $o->optionAttributeOptionId)
11341120 ),
1135 - $optionAttributeValuesTable,
 1121+ $dataSet->optionAttributeValues,
11361122 array("object_id IN (" . implode(", ", $objectIds) . ")")
11371123 );
11381124
@@ -1144,10 +1130,10 @@
11451131
11461132 /* XXX: This can probably be combined with other functions. In fact, it probably should be. Do it. */
11471133 function expandOptionsInRecordSet(RecordSet $recordSet, ViewInformation $viewInformation) {
 1134+ global
 1135+ $dataSet;
11481136
11491137 $o=OmegaWikiAttributes::getInstance();
1150 - global
1151 - $optionAttributeOptionsTable, $classAttributesTable;
11521138
11531139 $recordSet->getStructure()->addAttribute($o->optionAttributeOption);
11541140 $recordSet->getStructure()->addAttribute($o->optionAttribute);
@@ -1163,7 +1149,7 @@
11641150 new TableColumnsToAttribute(array('attribute_id'), $o->optionAttributeId),
11651151 new TableColumnsToAttribute(array('option_mid'), $o->optionAttributeOption)
11661152 ),
1167 - $optionAttributeOptionsTable,
 1153+ $dataSet->optionAttributeOptions,
11681154 array('option_id = ' . $record->optionAttributeOptionId)
11691155 );
11701156
@@ -1175,7 +1161,7 @@
11761162 $viewInformation->queryTransactionInformation,
11771163 $o->optionAttributeId,
11781164 new TableColumnsToAttributesMapping(new TableColumnsToAttribute(array('attribute_mid'), $o->optionAttribute)),
1179 - $classAttributesTable,
 1165+ $dataSet->classAttributes,
11801166 array('object_id = ' . $optionRecord->optionAttributeId)
11811167 );
11821168
@@ -1185,10 +1171,10 @@
11861172 }
11871173
11881174 function getDefinedMeaningClassMembershipRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 1175+ global
 1176+ $dataSet;
11891177
11901178 $o=OmegaWikiAttributes::getInstance();
1191 - global
1192 - $classMembershipsTable;
11931179
11941180 $recordSet = queryRecordSet(
11951181 $o->classMembershipStructure->getStructureType(),
@@ -1198,7 +1184,7 @@
11991185 new TableColumnsToAttribute(array('class_membership_id'), $o->classMembershipId),
12001186 new TableColumnsToAttribute(array('class_mid'), $o->class)
12011187 ),
1202 - $classMembershipsTable,
 1188+ $dataSet->classMemberships,
12031189 array("class_member_mid=$definedMeaningId")
12041190 );
12051191
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataTables.php
@@ -82,15 +82,13 @@
8383 public $columns;
8484
8585 public function __construct($identifier, $isVersioned) {
86 - # Without dataset prefix!
8786 $this->identifier = $identifier;
8887 $this->isVersioned = $isVersioned;
8988 $this->columns = array();
9089 }
9190
9291 public function getIdentifier() {
93 - $dc = wdGetDataSetContext();
94 - return "{$dc}_" . $this->identifier;
 92+ return $this->identifier;
9593 }
9694
9795 protected function createColumn($identifier) {
@@ -397,43 +395,49 @@
398396 }
399397 }
400398
 399+class WikiDataSet {
 400+ public $alternativeDefinitions;
 401+ public $bootstrappedDefinedMeanings;
 402+ public $classAttributes;
 403+ public $classMemberships;
 404+ public $collectionMemberships;
 405+ public $definedMeaning;
 406+ public $expression;
 407+ public $linkAttributeValues;
 408+ public $meaningRelations;
 409+ public $optionAttributeOptions;
 410+ public $optionAttributeValues;
 411+ public $syntrans;
 412+ public $textAttributeValues;
 413+ public $translatedContentAttributeValues;
 414+ public $translatedContent;
 415+ public $transactions;
 416+
 417+ public function __construct($dataSetPrefix) {
 418+ $this->alternativeDefinitions = new AlternativeDefinitionsTable("{$dataSetPrefix}_alt_meaningtexts");
 419+ $this->bootstrappedDefinedMeanings = new BootstrappedDefinedMeaningsTable("{$dataSetPrefix}_bootstrapped_defined_meanings");
 420+ $this->classAttributes = new ClassAttributesTable("{$dataSetPrefix}_class_attributes");
 421+ $this->classMemberships = new ClassMembershipsTable("{$dataSetPrefix}_class_membership");
 422+ $this->collectionMemberships = new CollectionMembershipsTable("{$dataSetPrefix}_collection_contents");
 423+ $this->definedMeaning = new DefinedMeaningTable("{$dataSetPrefix}_defined_meaning");
 424+ $this->expression = new ExpressionTable("{$dataSetPrefix}_expression");
 425+ $this->linkAttributeValues = new LinkAttributeValuesTable("{$dataSetPrefix}_url_attribute_values");
 426+ $this->meaningRelations = new MeaningRelationsTable("{$dataSetPrefix}_meaning_relations");
 427+ $this->syntrans = new SyntransTable("{$dataSetPrefix}_syntrans");
 428+ $this->textAttributeValues = new TextAttributeValuesTable("{$dataSetPrefix}_text_attribute_values");
 429+ $this->transactions = new Table("{$dataSetPrefix}_transactions", false, array("transaction_id"));
 430+ $this->translatedContentAttributeValues = new TranslatedContentAttributeValuesTable("{$dataSetPrefix}_translated_content_attribute_values");
 431+ $this->translatedContent = new TranslatedContentTable("{$dataSetPrefix}_translated_content");
 432+ $this->optionAttributeOptions = new OptionAttributeOptionsTable("{$dataSetPrefix}_option_attribute_options");
 433+ $this->optionAttributeValues = new OptionAttributeValuesTable("{$dataSetPrefix}_option_attribute_values");
 434+ }
 435+}
 436+
401437 global
402 - $tables,
 438+ $dataSet;
403439
404 - $alternativeDefinitionsTable,
405 - $bootstrappedDefinedMeaningsTable,
406 - $classAttributesTable,
407 - $classMembershipsTable,
408 - $collectionMembershipsTable,
409 - $definedMeaningTable,
410 - $expressionTable,
411 - $linkAttributeValuesTable,
412 - $meaningRelationsTable,
413 - $optionAttributeOptionsTable,
414 - $optionAttributeValuesTable,
415 - $syntransTable,
416 - $textAttributeValuesTable,
417 - $translatedContentAttributeValuesTable,
418 - $translatedContentTable,
419 - $transactionsTable;
420 -
421440 $dc=wdGetDataSetContext();
422 -$alternativeDefinitionsTable = new AlternativeDefinitionsTable("alt_meaningtexts");
423 -$bootstrappedDefinedMeaningsTable = new BootstrappedDefinedMeaningsTable("bootstrapped_defined_meanings");
424 -$classAttributesTable = new ClassAttributesTable("class_attributes");
425 -$classMembershipsTable = new ClassMembershipsTable("class_membership");
426 -$collectionMembershipsTable = new CollectionMembershipsTable("collection_contents");
427 -$definedMeaningTable = new DefinedMeaningTable("defined_meaning");
428 -$expressionTable = new ExpressionTable("expression");
429 -$linkAttributeValuesTable = new LinkAttributeValuesTable("url_attribute_values");
430 -$meaningRelationsTable = new MeaningRelationsTable("meaning_relations");
431 -$syntransTable = new SyntransTable("syntrans");
432 -$textAttributeValuesTable = new TextAttributeValuesTable("text_attribute_values");
433 -$transactionsTable = new Table("transactions", false, array('transaction_id'));
434 -$translatedContentAttributeValuesTable = new TranslatedContentAttributeValuesTable("translated_content_attribute_values");
435 -$translatedContentTable = new TranslatedContentTable("translated_content");
436 -$optionAttributeOptionsTable = new OptionAttributeOptionsTable("option_attribute_options");
437 -$optionAttributeValuesTable = new OptionAttributeValuesTable("option_attribute_values");
 441+$dataSet = new WikiDataSet($dc);
438442
439443 function genericSelect($selectCommand, array $expressions, array $tables, array $restrictions) {
440444 $result = $selectCommand . " " . $expressions[0]->toExpression();

Status & tagging log