GithubHelp home page GithubHelp logo

jeroendedauw / wikibasequeryengine Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 570 KB

Answers Ask queries against a collection of Wikibase entities

Home Page: https://wikibase.consulting

License: Other

PHP 99.71% Shell 0.29%

wikibasequeryengine's Introduction

Wikibase QueryEngine

Build Status Scrutinizer Code Quality Code Coverage Dependency Status

On Packagist: Latest Stable Version Download count

Wikibase QueryEngine is a library that supports running Ask queries against a collection of Wikibase entities.

Recent changes can be found in the release notes.

Note that this is a fork of the original Wikibase Query Engine, which has the wikibase/query-engine package name. This version is ahead of the original, which is no longer actively developed by its original maintainer: Wikimedia Deutchland.

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 jeroen/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.x:

    {
        "require": {
            "jeroen/query-engine": "~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.

Running the tests

For tests only

composer test

For style checks only

composer cs

For a full CI run

composer ci

Usage

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 Jeroen De Dauw, and by the Wikidata team for the Wikidata project.

Links

Related projects

wikibasequeryengine's People

Contributors

jeroendedauw avatar thiemowmde avatar addshore avatar translatewiki avatar mariushoch avatar tobijat avatar adrianheine avatar janzerebecki avatar frimelle avatar filbertkm avatar raymondde avatar

Stargazers

Mayel de Borniol avatar

Watchers

 avatar James Cloos avatar mwjames avatar

wikibasequeryengine's Issues

SQLStore exceptions

Database interaction exceptions need to be caught and propagated with a proper exception type.

Only where applicable - at some points we might want to fire error events instead, so the user can determine if execution should be aborted or not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.