gitquery - Git 仓库的 SQL 接口
MIT
跨平台
Google Go
软件简介
基于 Go 的 Git 仓库的 SQL 接口。
用法
Usage:
gitquery [OPTIONS] <query | shell | version>
Help Options:
-h, --help Show this help message
Available commands:
query Execute a SQL query a repository.
shell Start an interactive session.
version Show the version information.
例如
$ cd my_git_repo
$ gitquery query 'SELECT hash, author_email, author_name FROM commits LIMIT 2;'
SELECT hash, author_email, author_name FROM commits LIMIT 2;
+------------------------------------------+---------------------+-----------------------+
| HASH | AUTHOR EMAIL | AUTHOR NAME |
+------------------------------------------+---------------------+-----------------------+
| 003dc36e0067b25333cb5d3a5ccc31fd028a1c83 | user1@test.io | Santiago M. Mola |
| 01ace9e4d144aaeb50eb630fed993375609bcf55 | user2@test.io | Antonio Navarro Perez |
+------------------------------------------+---------------------+-----------------------+
您可以像通常那样使用交互式shell来查看postgreSQL中的表。
$ gitquery shell
gitQL SHELL
-----------
You must end your queries with ';'
!> SELECT hash, author_email, author_name FROM commits LIMIT 2;
--> Executing query: SELECT hash, author_email, author_name FROM commits LIMIT 2;
+------------------------------------------+---------------------+-----------------------+
| HASH | AUTHOR EMAIL | AUTHOR NAME |
+------------------------------------------+---------------------+-----------------------+
| 003dc36e0067b25333cb5d3a5ccc31fd028a1c83 | user1@test.io | Santiago M. Mola |
| 01ace9e4d144aaeb50eb630fed993375609bcf55 | user2@test.io | Antonio Navarro Perez |
+------------------------------------------+---------------------+-----------------------+
!>