Jay Taylor's notes
back to listing indexgitql/gitql
[web search]
Original source (github.com)
Clipped on: 2016-12-14
Skip to content
SQL interface to Git repositories, written in Go.
Go
Shell
Latest commit
2fda359
12 days ago
ajnavarro
committed on GitHub
git: add objects table, closes #54 (#77)
cmd/gitql | sql: add star (*) parsing and resolution. (#63) | 26 days ago | |
git | git: add objects table, closes #54 (#77) | 12 days ago | |
mem | sql/git: improve tests and fixes #68. (#76) | 12 days ago | |
sql | * sql: add catalog tests. (#79) | 12 days ago | |
.gitignore | Initial commit | 3 months ago | |
.travis.yml | travis: Deploy section (#41) | a month ago | |
LICENSE | update README.md and LICENSE. (#43) | a month ago | |
README.md | sql: support DESCRIBE table. (#66) | 26 days ago | |
engine.go | sql/parser: use vitess' sqlparser (#57) | 26 days ago | |
engine_test.go | sql/parse: generate sort and limit before project. (#44) | a month ago | |
gitql-logo.svg | Update gitql-logo.svg | a month ago | |
go.test.sh | Create go.test.sh | 3 months ago |
README.md
gitql is a SQL interface to Git repositories, written in Go.
WARNING: gitql is still in a very early stage of development. It is considered experimental.
Installation
Check the Releases page to download the gitql binary.
Usage
normalUsage:
gitql [OPTIONS] <query | version>
Help Options:
-h, --help Show this help message
Available commands:
query Execute a SQL query a repository.
version Show the version information.
normal
For example:
$ cd my_git_repo $ gitql 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 | +------------------------------------------+--------------------+---------------+ | 02e0aa0ef807d2ae4d02ecdbe37681db9e812544 | Santiago M. Mola | user1@test.io | | 034cb63f77f4a0d30d26dabb999d348be6640df7 | Antonio J. Navarro | user2@test.io | +------------------------------------------+--------------------+---------------+
Tables
gitql exposes the following tables:
- commits (hash, author_name, author_email, author_time, comitter_name, comitter_email, comitter_time, message)
- blobs (hash, size)
- references (hash, name, is_branch, is_note, is_remote, is_tag, target)
- tags (hash, name, tagger_email, tagger_name, tagger_when, message, target)
- tree_entries (tree_hash, entry_hash, mode, name)
SQL syntax
gitql supports a subset of the SQL standard, currently including:
SELECT
WHERE
ORDER BY
(withASC
andDESC
)LIMIT
SHOW TABLES
DESCRIBE TABLE
License
gitql is licensed under the MIT License.