git查询语言
gitql的Python项目详细描述
gitql是一种git查询语言。
gitql是由golang编写的 cloudson最初,我 用python语言重新实现,并进行了一些增强。
安装
pip install gitql
或
pip install git+https://github.com/mackong/gitql.git#egg=gitql
或
python setup.py install
用法
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
与Gitql
表、字段、关键字不区分大小写
Select * From COMMITS wherE author='bob';
字段消息->;摘要,完整消息->;提交中更改的消息 表
*可与其他字段组合使用
select *, name, full_name from tags;
添加的表页脚类似于mysql
关键字not已添加
select * from tags where not 'RC' in name;
对于all记录限制-1
select * from tags limit -1;
添加到限制的偏移量
select * from tags limit 5, 5;
或
select * from tags limit 5 offset 5;
尾随;是可选的
select * from tags
或
select * from tags;
删除了where子句中的值类型限制
select summary, date from commits where '2016-12-28' < date;
或
select * from commits where 1 and 2;