-
Notifications
You must be signed in to change notification settings - Fork 124
Update README #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update README #110
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7349111
Update README
ajnavarro cbf574c
Update README.md
ajnavarro 34b1c44
Update README.md
ajnavarro d89619c
Update README.md
ajnavarro 9a8378a
Update README.md
ajnavarro b8d929b
Update README.md
ajnavarro af28003
Update README.md
ajnavarro 6721fb7
Update README.md
ajnavarro 872c6d3
Update readme
ajnavarro 93d870f
Update README.md
ajnavarro b352b5c
Update README.md
ajnavarro 31e7635
Remove planned column
ajnavarro a9941cd
Update README.md
ajnavarro 6380777
deleted gif
ajnavarro 926999e
Update README.md
ajnavarro 117e472
Update README.md
ajnavarro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
#  | ||
|
||
[](https://travis-ci.org/gitql/gitql) [](https://codecov.io/gh/gitql/gitql) [](https://godoc.org/github.com/gitql/gitql) | ||
|
||
**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.** | ||
<p align="center"> | ||
<img src="https://rawgit.com/gitql/gitql/master/gitql-logo.svg"> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://codebeat.co/projects/gb.xjqchip.workers.dev-gitql-gitql"><img alt="codebeat badge" src="https://codebeat.co/badges/ff0a63ef-e1b1-4a8a-9662-8b2ae17718fa" /></a> | ||
|
||
<a href="https://travis-ci.org/gitql/gitql"><img alt="Build Status" src="https://travis-ci.org/gitql/gitql.svg?branch=master" /></a> | ||
|
||
<a href="https://codecov.io/gh/gitql/gitql"><img alt="codecov" src="https://codecov.io/gh/gitql/gitql/branch/master/graph/badge.svg" /></a> | ||
|
||
<a href="https://godoc.org/github.com/gitql/gitql"><img alt="GoDoc" src="https://godoc.org/github.com/gitql/gitql?status.svg" /></a> | ||
</p> | ||
<a href="https://asciinema.org/a/102717?autoplay=1" target="_blank"><img src="https://asciinema.org/a/102717.png" width="979"/></a> | ||
|
||
## Installation | ||
|
||
|
@@ -13,15 +20,16 @@ the gitql binary. | |
|
||
## Usage | ||
|
||
``` | ||
```bash | ||
Usage: | ||
gitql [OPTIONS] <query | version> | ||
gitql [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. | ||
``` | ||
|
||
|
@@ -31,35 +39,58 @@ 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 | [email protected] | | ||
| 034cb63f77f4a0d30d26dabb999d348be6640df7 | Antonio J. Navarro | [email protected] | | ||
+------------------------------------------+--------------------+---------------+ | ||
+------------------------------------------+---------------------+-----------------------+ | ||
| HASH | AUTHOR EMAIL | AUTHOR NAME | | ||
+------------------------------------------+---------------------+-----------------------+ | ||
| 003dc36e0067b25333cb5d3a5ccc31fd028a1c83 | [email protected] | Santiago M. Mola | | ||
| 01ace9e4d144aaeb50eb630fed993375609bcf55 | [email protected] | Antonio Navarro Perez | | ||
+------------------------------------------+---------------------+-----------------------+ | ||
``` | ||
|
||
Also you can use the interactive shell like you usually do to explore tables in postgreSQL per example: | ||
|
||
```bash | ||
$ gitql 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 | | ||
+------------------------------------------+---------------------+-----------------------+ | ||
!> | ||
``` | ||
|
||
## 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) | ||
| Name | Columns | | ||
|:------------:|:---------------------------------------------------------------------------------------------------:| | ||
| commits | hash, author_name, author_email, author_time, comitter_name, comitter_email, comitter_time, message | | ||
| blobs | hash, size | | ||
| references | hash,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: | ||
We are adding continuously more functionality to gitql. Actually we supports a subset of the SQL standard, currently including: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are adding continously -> We are continuously adding |
||
|
||
* `SELECT` | ||
* `WHERE` | ||
* `ORDER BY` (with `ASC` and `DESC`) | ||
* `LIMIT` | ||
* `GROUP BY` (with `COUNT` and `FIRST`) | ||
* `SHOW TABLES` | ||
* `DESCRIBE TABLE` | ||
| | Supported | Planned | | ||
|:----------------------:|:---------------------------------------------------------------------------------:|:--------------------:| | ||
| Comparison expressions | !=, ==, >, <, >=,<= | | | ||
| Grouping expressions | COUNT, FIRST | LAST, SUM, AVG | | ||
| Standard expressions | ALIAS, LITERAL, STAR (*) | LIKE, REGEXP | | ||
| Statements | CROSS JOIN, DESCRIBE, FILTER (WHERE), GROUP BY, LIMIT, SELECT, SHOW TABLES, SORT | more JOINS, DISTINCT | | ||
|
||
## License | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the "also".