Skip to main content

A git query language

Project description

https://travis-ci.org/mackong/gitql.svg?branch=master

Gitql is a Git query language.

Gitql is written in Golang by cloudson originally, I reimplemented by python language, and with some enhancements.

Installation

pip install gitql

or

pip install git+https://github.com/mackong/gitql.git#egg=gitql

or

python setup.py install

Usage

usage: gitql [-h] [-i] [-p PATH] [-s] [-t {table,json}] [-f] [-v] [SQL]

Git query language

positional arguments:
  SQL                   A query to run

optional arguments:
  -h, --help            show this help message and exit
  -i, --interactive     Enter to interactive mode
  -p PATH, --path PATH  The path to run gitql (default ".")
  -s, --show-tables     Show all tables
  -t {table,json}, --type {table,json}
                        The output type format (default "table")
  -f, --format-json     Format the json output
  -v, --version         Show the version of gitql

Compare to Gitql

  • tables, fields, keywords case-insensitive

    Select * From COMMITS wherE author='bob';
  • field message -> summary, full_message -> message changed in commits table

  • * can combined with other fields

    select *, name, full_name from tags;
  • a table footer added similar to mysql

  • keyword NOT added

    select * from tags where not 'RC' in name;
  • limit -1 for all records

    select * from tags limit -1;
  • offset added to limit

    select * from tags limit 5, 5;

    or

    select * from tags limit 5 offset 5;
  • tailing ; is optional

    select * from tags

    or

    select * from tags;
  • value type limitation in where clause removed

    select summary, date from commits where '2016-12-28' < date;

    or

    select * from commits where 1 and 2;

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitql-1.0.5.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitql-1.0.5-py2.py3-none-any.whl (23.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file gitql-1.0.5.tar.gz.

File metadata

  • Download URL: gitql-1.0.5.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gitql-1.0.5.tar.gz
Algorithm Hash digest
SHA256 48e7ec51ea6cdbe468849c2a299bbe88d10f7755b1d8394f58a4d0cd3c683a29
MD5 ea7e87f74d165a068ef66bb22efab66a
BLAKE2b-256 a8c18d0aa63e2c5855ac863803fb966c26a98fc2322efd587d5d837df9b6a77e

See more details on using hashes here.

File details

Details for the file gitql-1.0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for gitql-1.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1488c7b8b9bd8631494c19bd59e47dd98ed0237dc7b009ab956ff21f09c1939b
MD5 0101f2ceae36a708b76ed90ad4af40d8
BLAKE2b-256 f6830d6db2037eab57dbdb6d670bcba206810b2f533f42cfc5dec68ccdf5fe71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page