gitquery Git 仓库的 SQL 接口

程序名称:gitquery

授权协议: MIT

操作系统: 跨平台

开发语言: Google Go

gitquery 介绍

基于 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 | [email protected]       | Santiago M. Mola      |
| 01ace9e4d144aaeb50eb630fed993375609bcf55 | [email protected]       | 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 | [email protected]       | Santiago M. Mola      |
| 01ace9e4d144aaeb50eb630fed993375609bcf55 | [email protected]       | Antonio Navarro Perez |
+------------------------------------------+---------------------+-----------------------+
!>

gitquery 官网

https://github.com/sqle/gitquery?from=timeline

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐