Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/52200
Change subject: Added some more stub stuff in the sqlstore
......................................................................
Added some more stub stuff in the sqlstore
Change-Id: Ibefeadd4f3e1e0c6c0413c1b6037373ef69c0541
---
M repo/config/Wikibase.experimental.php
M repo/includes/Query/SQLStore/Engine.php
A repo/includes/Query/SQLStore/Writer.php
M repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php
4 files changed, 73 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/00/52200/1
diff --git a/repo/config/Wikibase.experimental.php
b/repo/config/Wikibase.experimental.php
index 13ee295..2827330 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -67,6 +67,7 @@
'Wikibase\Repo\Query\SQLStore\Engine',
'Wikibase\Repo\Query\SQLStore\Setup',
'Wikibase\Repo\Query\SQLStore\Store',
+ 'Wikibase\Repo\Query\SQLStore\Writer',
);
foreach ( $classes as $class ) {
diff --git a/repo/includes/Query/SQLStore/Engine.php
b/repo/includes/Query/SQLStore/Engine.php
index ac0bfe9..2c59137 100644
--- a/repo/includes/Query/SQLStore/Engine.php
+++ b/repo/includes/Query/SQLStore/Engine.php
@@ -34,14 +34,28 @@
*/
class Engine implements QueryEngine {
- // TODO
+ /**
+ * @since wd.qe
+ *
+ * @var Store
+ */
+ private $store;
- public function __construct() {
- // TODO
+ /**
+ * Constructor.
+ *
+ * @since wd.qe
+ *
+ * @param Store $store
+ */
+ public function __construct( Store $store ) {
+ $this->store = $store;
}
/**
* @see QueryEngine::runQuery
+ *
+ * @since wd.qe
*
* @param Query $query
*
@@ -51,4 +65,4 @@
// TODO
}
-}
\ No newline at end of file
+}
diff --git a/repo/includes/Query/SQLStore/Writer.php
b/repo/includes/Query/SQLStore/Writer.php
new file mode 100644
index 0000000..41907be
--- /dev/null
+++ b/repo/includes/Query/SQLStore/Writer.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace Wikibase\Repo\Query\SQLStore;
+
+/**
+ * Class responsible for writing information to the SQLStore.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since wd.qe
+ *
+ * @file
+ * @ingroup WikibaseSQLStore
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < [email protected] >
+ */
+class Writer {
+
+ /**
+ * @since wd.qe
+ *
+ * @var Store
+ */
+ private $store;
+
+ /**
+ * Constructor.
+ *
+ * @since wd.qe
+ *
+ * @param Store $store
+ */
+ public function __construct( Store $store ) {
+ $this->store = $store;
+ }
+
+ // TODO: write methods
+
+}
diff --git a/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php
b/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php
index b63ec59..b2511a4 100644
--- a/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php
+++ b/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php
@@ -43,7 +43,7 @@
protected function getInstances() {
$instances = array();
- $instances[] = new Engine();
+ $instances[] = new Engine( new
\Wikibase\Repo\Query\SQLStore\Store( 'foo', array() ) );
return $instances;
}
--
To view, visit https://gerrit.wikimedia.org/r/52200
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibefeadd4f3e1e0c6c0413c1b6037373ef69c0541
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits