wikibase / query
Extension to Wikibase Repo that adds the ability to define and execute queries
Installs: 462
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 27
Forks: 2
Open Issues: 1
Type:mediawiki-extension
Requires
- php: >=5.3.0
- ask/ask: ~1.0
- composer/installers: 1.*,>=1.0.1
- data-values/data-values: ~1.0|~0.1
- data-values/interfaces: ~0.1
- serialization/serialization: ~3.0
- wikibase/data-model: ~2.0
- wikibase/entity-store: ~0.2.0@dev
- wikibase/query-engine: ~0.4.0@dev
- wikibase/wikibase: @dev
Requires (Dev)
- symfony/console: ~2.4
Suggests
- symfony/console: Allows use of the command line interface
This package is not auto-updated.
Last update: 2020-03-06 15:52:56 UTC
README
This extension is no longer maintained nor developed.
Wikibase Query
Wikibase Query adds query capabilities to Wikibase Repo. It is part of the Wikibase software.
Installation
You can use Composer to download and install this package as well as its dependencies. Alternatively you can simply clone the git repository and take care of loading yourself.
Composer
To add this package as a local, per-project dependency to your project, simply add a
dependency on wikibase/query
to your project's composer.json
file.
Here is a minimal example of a composer.json
file that just defines a dependency on
Wikibase Query 1.0:
{ "require": { "wikibase/query": "1.0.*" } }
CLI
To get a list of available CLI commands, execute this in the root directory:
php querycli
Technical documentation
All classes provided by WikibaseQuery reside in the Wikibase\Query namespace.
Public classes and interfaces have an @since tag denoting the version since which they can be accessed. Constructs without an @since tag are package private and should not be used by extensions.
Object graph construction is done via the dependency injection container defined in Wikibase\Query\DIC. Individual builders reside in Wikibase\Query\DIC\Builders. Builders are registered in Wikibase\Query\DIC\WikibaseQueryBuilder. All access to the DIC from outside the DIC happens via Wikibase\Query\DIC\WikibaseQuery. When requiring access to this class from a legacy API, the ExtensionAccess::getWikibaseQuery method should be used. Usage of this method is forbidden outside of legacy APIs in which we cannot achieve proper dependency construction.
Tests
This extension comes with a set up PHPUnit tests that cover all non-trivial code. The extension needs to be loaded via MediaWiki, after which the tests can be run via the MediaWiki test runner.
php phpunit.php -c ../../extensions/WikibaseQuery/
You might need to specify that MediaWiki should use normal tables
php phpunit.php -c ../../extensions/WikibaseQuery/ --use-normal-tables
If this does not work due to using PHPUnit 4.0 or later, you can temporarily modify your
MediaWikis MediaWikiPHPUnitCommand.php
file.
Authors
Wikibase Query has been written by the Wikidata team for the Wikidata project. You can view the full list of contributors.
Links
- Wikibase Query on Packagist
- Wikibase Query on Ohloh
- Wikibase Query on MediaWiki.org
- TravisCI build status