Skip to content

Commit

Permalink
Changing import paths (knq => xo)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Shaw committed Aug 12, 2017
1 parent a233ff6 commit 1744a73
Show file tree
Hide file tree
Showing 46 changed files with 85 additions and 85 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ SQLite3, Microsoft SQL Server, [and other databases](#database-support).
[Connection Strings]: #database-connection-strings (Database Connection Strings)
[Commands]: #backslash--commands (Backslash Commands)
[Building]: #buildinstall-from-source (Build/Install from Source)
[Releases]: https://github.com/knq/usql/releases (Project Releases)
[Releases]: https://github.com/xo/usql/releases (Project Releases)

## Quickstart

1. [Download a release for your platform](https://github.com/knq/usql/releases)
1. [Download a release for your platform](https://github.com/xo/usql/releases)
2. Extract the `.zip` (Windows), or `.tar.bz2` (OS X/Linux) file and place the
`usql` executable somewhere on your `%PATH%` (Windows), or your `$PATH` (OS X/Linux)
3. Connect to a database using `usql driver://user:pass@host/dbname`, and
Expand Down Expand Up @@ -54,12 +54,12 @@ you may [install directly](#build_install) in the usual Go fashion:
```sh
# install usql with most SQL drivers
$ go get -u -tags most github.com/knq/usql
$ go get -u -tags most github.com/xo/usql
```
## Interactive Demo
The below is a demonstration using `usql` with [xo's booktest](https://github.com/knq/xo)
The below is a demonstration using `usql` with [xo's booktest](https://github.com/xo/xo)
simple test database, showcasing the release version v0.5.0. In the demonstration,
`usql` connects to a PostgreSQL database, executes some queries, with variable
interpolation, connects to a SQLite3 database file, and does some more quries,
Expand All @@ -78,7 +78,7 @@ multiple databases <a href="https://asciinema.org/a/73gxbg62ny2fx9ppxu0kd8c48" t
`usql` aims to provide support for all Go standard library compatible SQL
drivers -- with an emphasis on supporting the drivers that sister project,
[`dburl`](https://github.com/knq/dburl), provides "out-of-the-box" URL support
[`dburl`](https://github.com/xo/dburl), provides "out-of-the-box" URL support
for.
The databases currently supported by `usql` (and related build tag name) are
Expand All @@ -105,7 +105,7 @@ summarized below:
| Sybase SQL Anywhere | sqlany | [github.com/a-palchikov/sqlago](https://github.com/a-palchikov/sqlago) |
| VoltDB | voltdb | [github.com/VoltDB/voltdb-client-go/voltdbclient](github.com/VoltDB/voltdb-client-go]) |
| | | |
| Google Spanner | spanner | github.com/knq/spanner (not yet public) |
| Google Spanner | spanner | github.com/xo/spanner (not yet public) |
| | | |
| **MOST DRIVERS** | most | (all drivers listed above, excluding the drivers for Oracle and ODBC, which require third-party dependencies to build/install) |
| **ALL DRIVERS** | all | (all drivers listed above) |
Expand Down Expand Up @@ -145,7 +145,7 @@ using the `mysql` driver, or when a directory is found, `usql` will attempt to
open the path using the `postgres` driver; last, if it the path is a regular
file, `usql` will attempt to open the file using the `sqlite3` driver.
`usql` recognizes the same drivers and scheme aliases from the [`dburl`](https://github.com/knq/dburl)
`usql` recognizes the same drivers and scheme aliases from the [`dburl`](https://github.com/xo/dburl)
package. Please see the `dburl` documentation for more in-depth information on
how DSNs are built from standard URLs. Additionally, all of the above formats
can be used in conjuction with the `\c` (or `\connect`) backslash meta command.
Expand Down Expand Up @@ -255,7 +255,7 @@ You can build or install `usql` from source in the usual Go fashion:
```sh
# install usql (includes support for PosgreSQL, MySQL, SQLite3, and MS SQL)
$ go get -u github.com/knq/usql
$ go get -u github.com/xo/usql
```
Please note that default calls to `go get`, `go build`, or `go install` will
Expand All @@ -275,19 +275,19 @@ number of build tags to enable/disable specific drivers as needed:
```sh
# install all drivers
$ go get -u -tags all github.com/knq/usql
$ go get -u -tags all github.com/xo/usql
# install with "most" drivers (same as "all" but excludes oracle/odbc)
$ go get -u -tags most github.com/knq/usql
$ go get -u -tags most github.com/xo/usql
# install with base drivers and oracle / odbc support
$ go get -u -tags 'oracle odbc' github.com/knq/usql
$ go get -u -tags 'oracle odbc' github.com/xo/usql
# install all drivers but exclude avatica, and couchbase drivers
$ go get -u -tags 'all no_avatica no_couchbase'
```
For reference, [`usql` releases](https://github.com/knq/usql/releases) are
For reference, [`usql` releases](https://github.com/xo/usql/releases) are
built with the `most` tag, and with [additional SQLite3 specific build tags](contrib/build-release.sh).
### Using `usql` as a library
Expand All @@ -301,7 +301,7 @@ relatively straight-forward and easy to do so.
Please refer to the [main command-line entry point](main.go) to see how `usql`
uses its constituent packages to create a interactive command-line
handler/interpreter. Additionally, `usql`'s code is fairly well-documented --
please refer to the [GoDoc listing](https://godoc.org/github.com/knq/usql) to
please refer to the [GoDoc listing](https://godoc.org/github.com/xo/usql) to
see how it's all put together.
## Compatibility and TODO
Expand Down Expand Up @@ -386,5 +386,5 @@ Additional:
## Related Projects
* [dburl](https://github.com/knq/dburl) - a Go package providing a standard, URL style mechanism for parsing and opening database connection URLs
* [xo](https://github.com/knq/xo) - a command-line tool to generate Go code from a database schema
* [dburl](https://github.com/xo/dburl) - a Go package providing a standard, URL style mechanism for parsing and opening database connection URLs
* [xo](https://github.com/xo/xo) - a command-line tool to generate Go code from a database schema
2 changes: 1 addition & 1 deletion args.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/knq/usql/text"
"github.com/xo/usql/text"
)

// Args are the command line arguments.
Expand Down
2 changes: 1 addition & 1 deletion contrib/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pushd $SRC &> /dev/null

go build \
-tags "$TAGS" \
-ldflags="-s -w -X github.com/knq/usql/text.CommandName=$NAME -X github.com/knq/usql/text.CommandVersion=$VER" \
-ldflags="-s -w -X github.com/xo/usql/text.CommandName=$NAME -X github.com/xo/usql/text.CommandVersion=$VER" \
-o $BIN

echo -n "checking usql --version: "
Expand Down
2 changes: 1 addition & 1 deletion drivers/adodb/adodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
// DRIVER: adodb
_ "github.com/mattn/go-adodb"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/avatica/avatica.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
// DRIVER: avatica
"github.com/Boostport/avatica"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
// DRIVER: clickhouse
_ "github.com/kshvakov/clickhouse"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/couchbase/couchbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
// DRIVER: n1ql
_ "github.com/couchbase/go_n1ql"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions drivers/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"strings"

"github.com/knq/dburl"
"github.com/knq/usql/stmt"
"github.com/knq/usql/text"
"github.com/xo/dburl"
"github.com/xo/usql/stmt"
"github.com/xo/usql/text"
)

// DB is the common interface for database operations, compatible with
Expand Down
2 changes: 1 addition & 1 deletion drivers/firebird/firebird.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
// DRIVER: firebirdsql
_ "github.com/nakagami/firebirdsql"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/mssql/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
// DRIVER: mssql
"github.com/denisenkom/go-mssqldb"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/mymysql/mymysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/ziutek/mymysql/mysql"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
// DRIVER: mysql
"github.com/go-sql-driver/mysql"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/odbc/odbc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
// DRIVER: odbc
"github.com/alexbrainman/odbc"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// DRIVER: ora
_ "gopkg.in/rana/ora.v4"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

var allCapsRE = regexp.MustCompile(`^[A-Z][A-Z0-9_]+$`)
Expand Down
2 changes: 1 addition & 1 deletion drivers/pgx/pgx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/jackc/pgx"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
// DRIVER: postgres
"github.com/lib/pq"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/ql/ql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
// DRIVER: ql
_ "github.com/cznic/ql/driver"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/saphana/saphana.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
// DRIVER: hdb
_ "github.com/SAP/go-hdb/driver"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions drivers/sqlite3/sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
// DRIVER: sqlite3
"github.com/mattn/go-sqlite3"

"github.com/knq/xoutil"
"github.com/xo/xoutil"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion drivers/voltdb/voltdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
// DRIVER: voltdb
_ "github.com/VoltDB/voltdb-client-go/voltdbclient"

"github.com/knq/usql/drivers"
"github.com/xo/usql/drivers"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"runtime"
"strings"

"github.com/knq/dburl"
"github.com/xo/dburl"

"github.com/knq/usql/text"
"github.com/xo/usql/text"
)

// getenv tries retrieving successive keys from os environment variables.
Expand Down
2 changes: 1 addition & 1 deletion env/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package env
import (
"unicode"

"github.com/knq/usql/text"
"github.com/xo/usql/text"
)

// Vars is a map of variables.
Expand Down
16 changes: 8 additions & 8 deletions handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import (
"strings"
"time"

"github.com/knq/dburl"
"github.com/olekukonko/tablewriter"

"github.com/knq/usql/drivers"
"github.com/knq/usql/env"
"github.com/knq/usql/metacmd"
"github.com/knq/usql/rline"
"github.com/knq/usql/stmt"
"github.com/knq/usql/text"
"github.com/xo/dburl"

"github.com/xo/usql/drivers"
"github.com/xo/usql/env"
"github.com/xo/usql/metacmd"
"github.com/xo/usql/rline"
"github.com/xo/usql/stmt"
"github.com/xo/usql/text"
)

// Handler is a input process handler.
Expand Down
2 changes: 1 addition & 1 deletion internal/adodb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/avatica.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/clickhouse.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/couchbase.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/firebird.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package internal
import (
// $NAME driver
_ "github.com/knq/usql/drivers/$NAME"
_ "github.com/xo/usql/drivers/$NAME"
)
ENDSTR
)
Expand Down
2 changes: 1 addition & 1 deletion internal/mssql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/mymysql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/mysql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1744a73

Please sign in to comment.