|
4 | 4 |
|
5 | 5 | ## Installation
|
6 | 6 |
|
7 |
| -Check the [Releases](https://github.com/sqle/gitquery/releases) page to download |
| 7 | +Check the [Releases](https://github.com/src-d/gitquery/releases) page to download |
8 | 8 | the gitquery binary.
|
9 | 9 |
|
10 | 10 | ## Usage
|
11 | 11 |
|
12 | 12 | ```bash
|
13 | 13 | Usage:
|
14 |
| - gitquery [OPTIONS] <query | shell | version> |
| 14 | + gitquery [OPTIONS] <server | version> |
15 | 15 |
|
16 | 16 | Help Options:
|
17 | 17 | -h, --help Show this help message
|
18 | 18 |
|
19 | 19 | Available commands:
|
20 |
| - query Execute a SQL query a repository. |
21 |
| - shell Start an interactive session. |
| 20 | + server Start SQL server. |
22 | 21 | version Show the version information.
|
23 | 22 | ```
|
24 | 23 |
|
25 |
| -For example: |
| 24 | +A MySQL client is needed to connect to the server. For example: |
26 | 25 |
|
27 | 26 | ```bash
|
28 |
| -$ cd my_git_repo |
29 |
| -$ gitquery query 'SELECT hash, author_email, author_name FROM commits LIMIT 2;' |
| 27 | +$ mysql -u root -h 127.0.0.1 |
| 28 | +MySQL [(none)]> SELECT hash, author_email, author_name FROM commits LIMIT 2; |
30 | 29 | SELECT hash, author_email, author_name FROM commits LIMIT 2;
|
31 | 30 | +------------------------------------------+---------------------+-----------------------+
|
32 |
| -| HASH | AUTHOR EMAIL | AUTHOR NAME | |
| 31 | +| hash | author_email | author_name | |
33 | 32 | +------------------------------------------+---------------------+-----------------------+
|
34 | 33 | | 003dc36e0067b25333cb5d3a5ccc31fd028a1c83 | [email protected] | Santiago M. Mola |
|
35 | 34 | | 01ace9e4d144aaeb50eb630fed993375609bcf55 | [email protected] | Antonio Navarro Perez |
|
36 | 35 | +------------------------------------------+---------------------+-----------------------+
|
37 |
| -``` |
38 |
| - |
39 |
| -You can use the interactive shell like you usually do to explore tables in postgreSQL per example: |
40 |
| - |
41 |
| -```bash |
42 |
| -$ gitquery shell |
43 |
| - |
44 |
| - gitQL SHELL |
45 |
| - ----------- |
46 |
| -You must end your queries with ';' |
47 |
| - |
48 |
| -!> SELECT hash, author_email, author_name FROM commits LIMIT 2; |
49 |
| - |
50 |
| ---> Executing query: SELECT hash, author_email, author_name FROM commits LIMIT 2; |
51 |
| - |
52 |
| -+------------------------------------------+---------------------+-----------------------+ |
53 |
| -| HASH | AUTHOR EMAIL | AUTHOR NAME | |
54 |
| -+------------------------------------------+---------------------+-----------------------+ |
55 |
| -| 003dc36e0067b25333cb5d3a5ccc31fd028a1c83 | [email protected] | Santiago M. Mola | |
56 |
| -| 01ace9e4d144aaeb50eb630fed993375609bcf55 | [email protected] | Antonio Navarro Perez | |
57 |
| -+------------------------------------------+---------------------+-----------------------+ |
58 |
| -!> |
| 36 | +2 rows in set (0.01 sec) |
59 | 37 | ```
|
60 | 38 |
|
61 | 39 | ## Tables
|
@@ -83,4 +61,4 @@ We are continuously adding more functionality to gitquery. We support a subset o
|
83 | 61 |
|
84 | 62 | ## License
|
85 | 63 |
|
86 |
| -gitquery is licensed under the [MIT License](https://github.com/sqle/gitquery/blob/master/LICENSE). |
| 64 | +gitquery is licensed under the [MIT License](https://github.com/src-d/gitquery/blob/master/LICENSE). |
0 commit comments