Download the PHP package wikibase/query-engine without Composer
On this page you can find all versions of the php package wikibase/query-engine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wikibase/query-engine
More information about wikibase/query-engine
Files in wikibase/query-engine
Package query-engine
Short Description Answers Ask queries against a collection of Wikibase entities
License GPL-2.0+
Homepage https://github.com/wmde/WikibaseQueryEngine
Informations about the package query-engine
WMDE has stopped development of this component. A fork with further development work done on it can be found at jeroen/query-engine.
Wikibase QueryEngine
On Packagist:
Wikibase QueryEngine is a component that supports running Ask queries against a collection of Wikibase entities.
It is primarily used by the Wikibase MediaWiki extensions, though has no dependencies whatsoever on these or on MediaWiki itself.
Recent changes can be found in the release notes.
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-engine
to your project's composer.json
file.
Here is a minimal example of a composer.json
file that just defines a dependency on
Wikibase QueryEngine 1.0:
Manual
Get the Wikibase QueryEngine code, either via git, or some other means. Also get all dependencies. You can find a list of the dependencies in the "require" section of the composer.json file. Load all dependencies and the load the Wikibase QueryEngine library by including its entry point: WikibaseQueryEngine.php.
Tests
This library comes with a set up PHPUnit tests that cover all non-trivial code. You can run these tests using the PHPUnit configuration file found in the root directory. The tests can also be run via TravisCI, as a TravisCI configuration file is also provided in the root directory.
Running the tests
phpunit
Usage
The public interfaces in this component are everything directly in the Wikibase\QueryEngine. Other classes and interfaces are typically package private, and should not be used or known about outside of the package. Each store implementation has its own list of additional public classes.
SQLStore
Public classes of the SQLStore:
Needed for construction:
- SQLStore\SQLStore
- SQLStore\StoreSchema
- SQLStore\DataValueHandlers
- SQLStore\StoreConfig
- SQLStore\StoreSchema
Needed for extension:
- SQLStore\DataValueHandler
Constructing an SQLStore:
CLI
To get a list of available CLI commands, execute this in the root directory:
php queryengine
SQLStore internal structure
Table: entities
- id, string: serialization of the entities id
- type, string: type of the entity
Snak tables
All snak tables have the following fields:
- row_id, int
- subject_id, string
- subject_type, string
- property_id, string
- statement_rank, int
The schema definition is dynamically build in StoreSchema.php.
Value snak tables
There is a value snak table per type of data value the store is configured to support.
All data value tables have a set of additional fields that are specific to the type of data value they store. For the types of data value natively supported by the store.
Valueless snak tables
Additional fields:
- snak_type, int: type of the snak, ie "no value"
Authors
Wikibase QueryEngine has been written by the Wikidata team for the Wikidata project.
Links
- Wikibase QueryEngine on Packagist
- Wikibase QueryEngine on Ohloh
- Wikibase QueryEngine on GitHub
- TravisCI build status
Related projects
Bugs on Phabricator
All versions of query-engine with dependencies
data-values/data-values Version ~0.1
data-values/iri Version ~0.1
data-values/number Version ~0.1
data-values/geo Version ~0.2
data-values/time Version ~0.6
ask/ask Version ~1.0
wikibase/data-model Version ~1.0@dev|~0.8.1|~0.9
doctrine/dbal Version ~2.4