Jeroen De Dauw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/52362


Change subject: Added stubs to QueryStoreUpdater
......................................................................

Added stubs to QueryStoreUpdater

Change-Id: I446cbea75417a6834a600ff0adbec31d38b931a8
---
M repo/includes/Query/QueryStoreUpdater.php
M repo/includes/Query/SQLStore/Updater.php
M repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php
3 files changed, 73 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/62/52362/1

diff --git a/repo/includes/Query/QueryStoreUpdater.php 
b/repo/includes/Query/QueryStoreUpdater.php
index 533f551..33713d8 100644
--- a/repo/includes/Query/QueryStoreUpdater.php
+++ b/repo/includes/Query/QueryStoreUpdater.php
@@ -2,6 +2,8 @@
 
 namespace Wikibase\Repo\Query;
 
+use Wikibase\Entity;
+
 /**
  * Updater for a query store.
  * Implementing objects provide an interface via which new data can be inserted
@@ -32,6 +34,31 @@
  */
 interface QueryStoreUpdater {
 
-       // TODO
+       /**
+        * @see QueryStoreUpdater::insertEntity
+        *
+        * @since wd.qe
+        *
+        * @param Entity $entity
+        */
+       public function insertEntity( Entity $entity );
+
+       /**
+        * @see QueryStoreUpdater::updateEntity
+        *
+        * @since wd.qe
+        *
+        * @param Entity $entity
+        */
+       public function updateEntity( Entity $entity );
+
+       /**
+        * @see QueryStoreUpdater::deleteEntity
+        *
+        * @since wd.qe
+        *
+        * @param Entity $entity
+        */
+       public function deleteEntity( Entity $entity );
 
 }
diff --git a/repo/includes/Query/SQLStore/Updater.php 
b/repo/includes/Query/SQLStore/Updater.php
index 06a03d2..15aae88 100644
--- a/repo/includes/Query/SQLStore/Updater.php
+++ b/repo/includes/Query/SQLStore/Updater.php
@@ -4,6 +4,7 @@
 
 use Wikibase\Repo\Query\QueryStoreUpdater;
 use Wikibase\Repo\Database\QueryInterface;
+use Wikibase\Entity;
 
 /**
  * Class responsible for writing information to the SQLStore.
@@ -60,6 +61,39 @@
                $this->queryInterface = $queryInterface;
        }
 
+       /**
+        * @see QueryStoreUpdater::insertEntity
+        *
+        * @since wd.qe
+        *
+        * @param Entity $entity
+        */
+       public function insertEntity( Entity $entity ) {
+               // TODO
+       }
+
+       /**
+        * @see QueryStoreUpdater::updateEntity
+        *
+        * @since wd.qe
+        *
+        * @param Entity $entity
+        */
+       public function updateEntity( Entity $entity ) {
+               // TODO
+       }
+
+       /**
+        * @see QueryStoreUpdater::deleteEntity
+        *
+        * @since wd.qe
+        *
+        * @param Entity $entity
+        */
+       public function deleteEntity( Entity $entity ) {
+               // TODO
+       }
+
        // TODO: write methods
 
 }
diff --git a/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php 
b/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php
index 7eb8675..4db385e 100644
--- a/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php
+++ b/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php
@@ -48,7 +48,17 @@
                return $this->arrayWrap( $this->getInstances() );
        }
 
-       public function testFoo() {
+       public function testInsertEntity() {
+               // TODO
+               $this->assertTrue( true );
+       }
+
+       public function testUpdateEntity() {
+               // TODO
+               $this->assertTrue( true );
+       }
+
+       public function testDeleteEntity() {
                // TODO
                $this->assertTrue( true );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/52362
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I446cbea75417a6834a600ff0adbec31d38b931a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to