Skip to content

Commit dd3841b

Browse files
authored
rename to gitquery, closes #83 (#118)
1 parent 478a42c commit dd3841b

22 files changed

+42
-50
lines changed

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ matrix:
1111
before_install:
1212
- rm -rf $GOPATH/src/gopkg.in/sqle
1313
- mkdir -p $GOPATH/src/gopkg.in/sqle
14-
- ln -s $PWD $GOPATH/src/gopkg.in/sqle/gitql.v0
15-
- cd $GOPATH/src/gopkg.in/sqle/gitql.v0
14+
- ln -s $PWD $GOPATH/src/gopkg.in/sqle/gitquery.v0
15+
- cd $GOPATH/src/gopkg.in/sqle/gitquery.v0
1616
- go get -t -v ./...
1717
install:
18-
- go build -ldflags="-X main.version=$TRAVIS_TAG" -v -o gitql ./cmd/...
18+
- go build -ldflags="-X main.version=$TRAVIS_TAG" -v -o gitquery ./cmd/...
1919
script:
2020
- sh ./go.test.sh
2121
after_success:
@@ -24,7 +24,7 @@ deploy:
2424
provider: releases
2525
api_key:
2626
secure: YUASK1+EaHQo1WPIDfSQZLynvPh/bFPVV8WNrbqWkqox+Y58MLeYCEGnDjP70pVsL5YmjZzeEGv4XRYIl359wqL7YxnB70mJGAmbi8xQ8DS+ecbpJXz+kDES/QqX6BVJYXMWRm2hM/XdyIDvPa5kaVBbeFlO86uizI0OSHE/2O4aticeaRUajTM+Bv7/R2ygVCiB+1gVdGqPmRy2w/bFUOAfR1LTC8TLDQFJUvgjtuJJVKhffKhcqfnibNyBtTEd9nwSuY4MAuva9ghgFvl1B9uJ266ktEDkqAjNX3Cg1UNyAPXs50M61gBUEFV/MAscCHrtHDdtzyrKPaUZ224TcTVjgEZiOG8Zus+0wvwyhf7wyxSHx73ZXGedu54/oazLqFudj9u2AM+qMrXoRtFcygtSXBdG4SaN0OL/EUXnxiJLPbfFT/oM7VpdEscZn8okMo7RtbGxszrJQOIvrcNd16IZHK10S/nVnGNHNNNuArwf5B15DK49gveB1+sv/8FkoTx3LXJFHHiA1C8l5sH+Of6v/YKa5Zspkub7wkKrE3fQ/zPc3D0AVvrMt/k6S0LBtQR6eJqqtasVLlmtrRujyOxWLWO7fwmRTsI6qT1O4fspGBaONg8cr9xuwsOGBcGIEaPCKv3RZrY8+hx2J7cLzV0qjaJtmucamnenxic7a6o=
27-
file: gitql
27+
file: gitquery
2828
skip_cleanup: true
2929
on:
3030
tags: true

README.md

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
1-
<p align="center">
2-
<img src="https://rawgit.com/sqle/gitql/master/gitql-logo.svg">
3-
</p>
4-
5-
<p align="center">
1+
# gitquery
62

3+
<p>
74
<a href="https://codebeat.co/projects/gb.xjqchip.workers.dev-sqle-gitql"><img alt="codebeat badge" src="https://codebeat.co/badges/d797a013-326b-4686-a1a7-adcb3039f65c" /></a>
85

9-
<a href="https://travis-ci.org/sqle/gitql"><img alt="Build Status" src="https://travis-ci.org/sqle/gitql.svg?branch=master" /></a>
6+
<a href="https://travis-ci.org/sqle/gitquery"><img alt="Build Status" src="https://travis-ci.org/sqle/gitquery.svg?branch=master" /></a>
107

11-
<a href="https://codecov.io/gh/sqle/gitql"><img alt="codecov" src="https://codecov.io/gh/sqle/gitql/branch/master/graph/badge.svg" /></a>
8+
<a href="https://codecov.io/gh/sqle/gitquery"><img alt="codecov" src="https://codecov.io/gh/sqle/gitquery/branch/master/graph/badge.svg" /></a>
129

13-
<a href="https://godoc.org/gopkg.in/sqle/gitql.v0"><img alt="GoDoc" src="https://godoc.org/gopkg.in/sqle/gitql.v0?status.svg" /></a>
10+
<a href="https://godoc.org/gopkg.in/sqle/gitquery.v0"><img alt="GoDoc" src="https://godoc.org/gopkg.in/sqle/gitquery.v0?status.svg" /></a>
1411
</p>
1512

1613
<a href="https://asciinema.org/a/102733?autoplay=1" target="_blank"><img src="https://asciinema.org/a/102733.png" width="979"/></a>
1714

1815
## Installation
1916

20-
Check the [Releases](https://github.com/sqle/gitql/releases) page to download
21-
the gitql binary.
17+
Check the [Releases](https://github.com/sqle/gitquery/releases) page to download
18+
the gitquery binary.
2219

2320
## Usage
2421

2522
```bash
2623
Usage:
27-
gitql [OPTIONS] <query | shell | version>
24+
gitquery [OPTIONS] <query | shell | version>
2825

2926
Help Options:
3027
-h, --help Show this help message
@@ -39,7 +36,7 @@ For example:
3936

4037
```bash
4138
$ cd my_git_repo
42-
$ gitql query 'SELECT hash, author_email, author_name FROM commits LIMIT 2;'
39+
$ gitquery query 'SELECT hash, author_email, author_name FROM commits LIMIT 2;'
4340
SELECT hash, author_email, author_name FROM commits LIMIT 2;
4441
+------------------------------------------+---------------------+-----------------------+
4542
| HASH | AUTHOR EMAIL | AUTHOR NAME |
@@ -52,7 +49,7 @@ SELECT hash, author_email, author_name FROM commits LIMIT 2;
5249
You can use the interactive shell like you usually do to explore tables in postgreSQL per example:
5350

5451
```bash
55-
$ gitql shell
52+
$ gitquery shell
5653

5754
gitQL SHELL
5855
-----------
@@ -73,7 +70,7 @@ You must end your queries with ';'
7370

7471
## Tables
7572

76-
gitql exposes the following tables:
73+
gitquery exposes the following tables:
7774

7875
| Name | Columns |
7976
|:------------:|:---------------------------------------------------------------------------------------------------:|
@@ -85,7 +82,7 @@ gitql exposes the following tables:
8582

8683
## SQL syntax
8784

88-
We are continuously adding more functionality to gitql. We support a subset of the SQL standard, currently including:
85+
We are continuously adding more functionality to gitquery. We support a subset of the SQL standard, currently including:
8986

9087
| | Supported |
9188
|:----------------------:|:---------------------------------------------------------------------------------:|
@@ -96,4 +93,4 @@ We are continuously adding more functionality to gitql. We support a subset of t
9693

9794
## License
9895

99-
gitql is licensed under the [MIT License](https://github.com/sqle/gitql/blob/master/LICENSE).
96+
gitquery is licensed under the [MIT License](https://github.com/sqle/gitquery/blob/master/LICENSE).

blobs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"gopkg.in/sqle/sqle.v0/sql"

blobs_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"testing"

cmd/gitql/main.go cmd/gitquery/main.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ import (
77
"github.com/jessevdk/go-flags"
88
)
99

10+
const (
11+
name = "gitquery"
12+
)
13+
1014
func main() {
11-
parser := flags.NewNamedParser("gitql", flags.Default)
15+
parser := flags.NewNamedParser(name, flags.Default)
1216
parser.AddCommand("query", "Execute a SQL query a repository.", "", &CmdQuery{})
1317
parser.AddCommand("shell", "Start an interactive session.", "", &CmdShell{})
1418
parser.AddCommand("version", "Show the version information.", "", &CmdVersion{})
File renamed without changes.

cmd/gitql/query_base.go cmd/gitquery/query_base.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"os"
66
"path/filepath"
77

8-
"gopkg.in/sqle/gitql.v0"
9-
"gopkg.in/sqle/gitql.v0/internal/format"
8+
"gopkg.in/sqle/gitquery.v0"
9+
"gopkg.in/sqle/gitquery.v0/internal/format"
1010
"gopkg.in/sqle/sqle.v0"
1111

1212
gogit "srcd.works/go-git.v4"
@@ -32,7 +32,7 @@ func (c *cmdQueryBase) buildDatabase() error {
3232
}
3333

3434
c.name = filepath.Base(filepath.Join(c.Path, ".."))
35-
sqle.DefaultEngine.AddDatabase(gitql.NewDatabase(c.name, r))
35+
sqle.DefaultEngine.AddDatabase(gitquery.NewDatabase(c.name, r))
3636
c.db, err = sql.Open(sqle.DriverName, "")
3737
return err
3838
}

cmd/gitql/shell.go cmd/gitquery/shell.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ func (c *CmdShell) Execute(args []string) error {
3131

3232
rl, err := readline.NewEx(&readline.Config{
3333
Prompt: prompt,
34-
HistoryFile: "/tmp/gitql-history",
34+
HistoryFile: fmt.Sprintf("/tmp/%s-history", name),
3535
DisableAutoSaveHistory: true,
3636
})
3737
if err != nil {
3838
return err
3939
}
4040

41-
fmt.Println(" ", white("git")+blue("QL"), "SHELL")
41+
fmt.Println(" ", white("git")+blue("query"), "shell")
4242
fmt.Println(" -----------")
4343
fmt.Println("You must end your queries with ';'")
4444
fmt.Println("")

cmd/gitql/version.go cmd/gitquery/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var build string
1010
type CmdVersion struct{}
1111

1212
func (c *CmdVersion) Execute(args []string) error {
13-
fmt.Printf("gitql (%s) - build %s\n", version, build)
13+
fmt.Printf("%s (%s) - build %s\n", name, version, build)
1414

1515
return nil
1616
}

commits.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"gopkg.in/sqle/sqle.v0/sql"

commits_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"testing"

database.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"gopkg.in/sqle/sqle.v0/sql"

database_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"sort"

gitql-logo.svg

-9
This file was deleted.

objects.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"gopkg.in/sqle/sqle.v0/sql"

objects_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"testing"

references.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"gopkg.in/sqle/sqle.v0/sql"

references_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"testing"

tags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"gopkg.in/sqle/sqle.v0/sql"

tags_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"testing"

tree_entries.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"strconv"

tree_entries_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitql
1+
package gitquery
22

33
import (
44
"testing"

0 commit comments

Comments
 (0)