From 44a164c84722c75ab2cbe79b876a53f7c4a95d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Nieto?= <jose.carlos@menteslibres.net> Date: Mon, 8 Jun 2015 21:01:51 -0500 Subject: [PATCH] Moving import paths back to "upper.io/db" --- .travis.yml | 26 +++++++++++++------------- README.md | 30 +++++++++++++++--------------- db.go | 10 +++++----- db_test.go | 12 ++++++------ mongo/README.md | 6 +++--- mongo/_example/main.go | 4 ++-- mongo/collection.go | 2 +- mongo/connection.go | 2 +- mongo/connection_test.go | 2 +- mongo/database.go | 4 ++-- mongo/database_test.go | 2 +- mongo/result.go | 2 +- mysql/README.md | 6 +++--- mysql/_example/main.go | 4 ++-- mysql/collection.go | 8 ++++---- mysql/connection.go | 2 +- mysql/connection_test.go | 2 +- mysql/database.go | 10 +++++----- mysql/database_test.go | 4 ++-- mysql/mysql.go | 8 ++++---- postgresql/README.md | 6 +++--- postgresql/_example/main.go | 4 ++-- postgresql/collection.go | 8 ++++---- postgresql/connection.go | 2 +- postgresql/connection_test.go | 2 +- postgresql/database.go | 10 +++++----- postgresql/database_test.go | 4 ++-- postgresql/postgresql.go | 8 ++++---- ql/_example/main.go | 4 ++-- ql/collection.go | 8 ++++---- ql/database.go | 10 +++++----- ql/database_test.go | 4 ++-- ql/ql.go | 8 ++++---- sqlite/README.md | 6 +++--- sqlite/_example/main.go | 4 ++-- sqlite/collection.go | 8 ++++---- sqlite/database.go | 10 +++++----- sqlite/database_test.go | 4 ++-- sqlite/sqlite.go | 8 ++++---- util/sqlutil/convert.go | 4 ++-- util/sqlutil/debug.go | 2 +- util/sqlutil/fetch.go | 2 +- util/sqlutil/result/result.go | 6 +++--- util/sqlutil/result/table.go | 2 +- util/sqlutil/scanner.go | 2 +- util/sqlutil/sqlutil.go | 2 +- wrapper.go | 2 +- 47 files changed, 143 insertions(+), 143 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2653088a..f489d418 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,21 +18,21 @@ env: GOARCH=amd64 TEST_HOST=127.0.0.1 UPPERIO_DB_DEBUG=1 install: - sudo apt-get install -y bzr make - mkdir -p $GOPATH/src/upper.io/v2 - - mv $PWD $GOPATH/src/upper.io/v2/db - - cd $GOPATH/src/upper.io/v2/db + - mv $PWD $GOPATH/src/upper.io/db + - cd $GOPATH/src/upper.io/db - ls -la - go get -v github.com/cznic/ql/ql # ql command line util. - go get -v -t -d - - go get -v -t -d upper.io/v2/db/mysql - - go get -v -t -d upper.io/v2/db/sqlite - - go get -v -t -d upper.io/v2/db/postgresql - - go get -v -t -d upper.io/v2/db/mongo - - go get -v -t -d upper.io/v2/db/ql + - go get -v -t -d upper.io/db/mysql + - go get -v -t -d upper.io/db/sqlite + - go get -v -t -d upper.io/db/postgresql + - go get -v -t -d upper.io/db/mongo + - go get -v -t -d upper.io/db/ql - go get -v github.com/pkieltyka/sqlx - (cd $GOPATH/src/github.com/pkieltyka/sqlx && git pull -a && git checkout ptrs) # temporal fix - (cp -r $GOPATH/src/github.com/pkieltyka/sqlx/* $GOPATH/src/github.com/jmoiron/sqlx) # temporal fix - (cd $GOPATH/src/github.com/jmoiron/sqlx && go build -a && go install) - - export TRAVIS_BUILD_DIR=$GOPATH/src/upper.io/v2/db + - export TRAVIS_BUILD_DIR=$GOPATH/src/upper.io/db services: - mongodb @@ -55,9 +55,9 @@ before_script: - cat ql/_dumps/structs.sql | $GOPATH/bin/ql -db ql/_dumps/test.db script: - - cd $GOPATH/src/upper.io/v2/db - - go test upper.io/v2/db/mysql -test.bench=. - - go test upper.io/v2/db/sqlite -test.bench=. - - go test upper.io/v2/db/ql -test.bench=. - - go test upper.io/v2/db/mongo -test.bench=. + - cd $GOPATH/src/upper.io/db + - go test upper.io/db/mysql -test.bench=. + - go test upper.io/db/sqlite -test.bench=. + - go test upper.io/db/ql -test.bench=. + - go test upper.io/db/mongo -test.bench=. - go test -test.v diff --git a/README.md b/README.md index d8da77fe..de32bf6c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# upper.io/v2/db +# upper.io/db *V2 IS CURRENTLY IN DEVELOPMENT AND NOT YET READY TO USE* @@ -10,15 +10,15 @@ ## The `db` package - + -`upper.io/v2/db` is a [Go][2] package that allows developers to communicate with +`upper.io/db` is a [Go][2] package that allows developers to communicate with different databases through the use of *adapters* that wrap well-supported database drivers. -## Is `upper.io/v2/db` an ORM? +## Is `upper.io/db` an ORM? -`upper.io/v2/db` is not an ORM in the sense that it does not tell you how to +`upper.io/db` is not an ORM in the sense that it does not tell you how to design your software or how to validate your data, instead it only focuses on being a tool that deals with common operations on different databases: @@ -31,26 +31,26 @@ res = col.Find(db.Cond{"name": "Max"}).Limit(10).Sort("-last_name") err = res.All(&people) ``` -In strict sense `upper.io/v2/db` could be considered a really basic non-magical +In strict sense `upper.io/db` could be considered a really basic non-magical ORM that rather stays out of the way. ## Supported databases - + -`upper.io/v2/db` attempts to provide full compatiblity for [CRUD][2] operations +`upper.io/db` attempts to provide full compatiblity for [CRUD][2] operations across adapters. Some other operations (such *transactions*) are supported only on specific database adapters, such as MySQL, PostgreSQL and SQLite. -* [MongoDB](https://upper.io/v2/db/mongo) via [mgo](http://godoc.org/labix.org/v2/mgo) -* [MySQL](https://upper.io/v2/db/mysql) via [mysql](https://github.com/go-sql-driver/mysql) -* [PostgreSQL](https://upper.io/v2/db/postgresql) via [pq](https://github.com/lib/pq) -* [QL](https://upper.io/v2/db/ql) via [ql](https://github.com/cznic/ql) -* [SQLite3](https://upper.io/v2/db/sqlite) via [go-sqlite3](https://github.com/mattn/go-sqlite3) +* [MongoDB](https://upper.io/db/mongo) via [mgo](http://godoc.org/labix.org/v2/mgo) +* [MySQL](https://upper.io/db/mysql) via [mysql](https://github.com/go-sql-driver/mysql) +* [PostgreSQL](https://upper.io/db/postgresql) via [pq](https://github.com/lib/pq) +* [QL](https://upper.io/db/ql) via [ql](https://github.com/cznic/ql) +* [SQLite3](https://upper.io/db/sqlite) via [go-sqlite3](https://github.com/mattn/go-sqlite3) ## User documentation -See the project page, recipes and user documentation at [upper.io/v2/db][1]. +See the project page, recipes and user documentation at [upper.io/db][1]. ## License @@ -75,6 +75,6 @@ See the project page, recipes and user documentation at [upper.io/v2/db][1]. > OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION > WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -[1]: https://upper.io/v2/db +[1]: https://upper.io/db [2]: http://golang.org [3]: http://en.wikipedia.org/wiki/Create,_read,_update_and_delete diff --git a/db.go b/db.go index d2434137..9807a3aa 100644 --- a/db.go +++ b/db.go @@ -22,19 +22,19 @@ // Package db provides a single interface for interacting with different data // sources through the use of adapters that wrap well-known database drivers. // -// As of today, `upper.io/v2/db` fully supports MySQL, PostgreSQL and SQLite (CRUD +// As of today, `upper.io/db` fully supports MySQL, PostgreSQL and SQLite (CRUD // + Transactions) and provides partial support for MongoDB and QL (CRUD only). // // Usage: // // import( // // Main package. -// "upper.io/v2/db" +// "upper.io/db" // // PostgreSQL adapter. -// "upper.io/v2/db/postgresql" +// "upper.io/db/postgresql" // ) // -// `upper.io/v2/db` is not an ORM and thus does not impose any hard restrictions +// `upper.io/db` is not an ORM and thus does not impose any hard restrictions // on data structures: // // // This code works the same for all supported databases. @@ -42,7 +42,7 @@ // res = col.Find(db.Cond{"name": "Max"}).Limit(2).Sort("-input") // err = res.All(&people) -package db // import "upper.io/v2/db" +package db // import "upper.io/db" // Cond is a map used to define conditions passed to `db.Collection.Find()` and // `db.Result.Where()`. diff --git a/db_test.go b/db_test.go index 09226836..9d9023c5 100644 --- a/db_test.go +++ b/db_test.go @@ -34,13 +34,13 @@ import ( "github.com/jmoiron/sqlx" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" - "upper.io/v2/db" - "upper.io/v2/db/mongo" + "upper.io/db" + "upper.io/db/mongo" - "upper.io/v2/db/mysql" - "upper.io/v2/db/postgresql" - "upper.io/v2/db/ql" - "upper.io/v2/db/sqlite" + "upper.io/db/mysql" + "upper.io/db/postgresql" + "upper.io/db/ql" + "upper.io/db/sqlite" ) var wrappers = []string{ diff --git a/mongo/README.md b/mongo/README.md index 3627fb22..ded918a2 100644 --- a/mongo/README.md +++ b/mongo/README.md @@ -1,6 +1,6 @@ -# MongoDB adapter for upper.io/v2/db +# MongoDB adapter for upper.io/db Please read the full docs, acknowledgements and examples at -[https://upper.io/v2/db/wrappers/mongo][1]. +[https://upper.io/db/wrappers/mongo][1]. -[1]: https://upper.io/v2/db/wrappers/mongo +[1]: https://upper.io/db/wrappers/mongo diff --git a/mongo/_example/main.go b/mongo/_example/main.go index b6635258..88420f85 100644 --- a/mongo/_example/main.go +++ b/mongo/_example/main.go @@ -5,8 +5,8 @@ import ( "log" "time" - "upper.io/v2/db" // Imports the main db package. - _ "upper.io/v2/db/mongo" // Imports the mongo adapter. + "upper.io/db" // Imports the main db package. + _ "upper.io/db/mongo" // Imports the mongo adapter. ) var settings = db.Settings{ diff --git a/mongo/collection.go b/mongo/collection.go index ca0dfa36..df339a01 100644 --- a/mongo/collection.go +++ b/mongo/collection.go @@ -30,7 +30,7 @@ import ( "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" - "upper.io/v2/db" + "upper.io/db" ) // Mongodb Collection diff --git a/mongo/connection.go b/mongo/connection.go index f0a7f9cb..cb4917a0 100644 --- a/mongo/connection.go +++ b/mongo/connection.go @@ -26,7 +26,7 @@ import ( "net/url" "strings" - "upper.io/v2/db" + "upper.io/db" ) const connectionScheme = `mongodb` diff --git a/mongo/connection_test.go b/mongo/connection_test.go index 2ca33718..3e3f4328 100644 --- a/mongo/connection_test.go +++ b/mongo/connection_test.go @@ -24,7 +24,7 @@ package mongo import ( "testing" - "upper.io/v2/db" + "upper.io/db" ) func TestConnectionURL(t *testing.T) { diff --git a/mongo/database.go b/mongo/database.go index bc1d4bf5..3e473c15 100644 --- a/mongo/database.go +++ b/mongo/database.go @@ -19,7 +19,7 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -package mongo // import "upper.io/v2/db/mongo" +package mongo // import "upper.io/db/mongo" import ( "fmt" @@ -29,7 +29,7 @@ import ( "time" "gopkg.in/mgo.v2" - "upper.io/v2/db" + "upper.io/db" ) const Adapter = `mongo` diff --git a/mongo/database_test.go b/mongo/database_test.go index 8bfeef09..fe426bb7 100644 --- a/mongo/database_test.go +++ b/mongo/database_test.go @@ -34,7 +34,7 @@ import ( "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "menteslibres.net/gosexy/to" - "upper.io/v2/db" + "upper.io/db" ) // Wrapper settings. diff --git a/mongo/result.go b/mongo/result.go index 5609815e..8e6269b3 100644 --- a/mongo/result.go +++ b/mongo/result.go @@ -29,7 +29,7 @@ import ( "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" - "upper.io/v2/db" + "upper.io/db" ) type Result struct { diff --git a/mysql/README.md b/mysql/README.md index 6cdb62fe..c2262cd3 100644 --- a/mysql/README.md +++ b/mysql/README.md @@ -1,7 +1,7 @@ -# MySQL adapter for upper.io/v2/db +# MySQL adapter for upper.io/db See the full docs, acknowledgements and examples at -[https://upper.io/v2/db/mysql][1] +[https://upper.io/db/mysql][1] -[1]: https://upper.io/v2/db/mysql +[1]: https://upper.io/db/mysql diff --git a/mysql/_example/main.go b/mysql/_example/main.go index f2248a65..fa4d20f6 100644 --- a/mysql/_example/main.go +++ b/mysql/_example/main.go @@ -5,8 +5,8 @@ import ( "log" "time" - "upper.io/v2/db" // Imports the main db package. - _ "upper.io/v2/db/mysql" // Improts the mysql adapter. + "upper.io/db" // Imports the main db package. + _ "upper.io/db/mysql" // Improts the mysql adapter. ) var settings = db.Settings{ diff --git a/mysql/collection.go b/mysql/collection.go index 383bbb9f..d510642b 100644 --- a/mysql/collection.go +++ b/mysql/collection.go @@ -25,10 +25,10 @@ import ( "database/sql" "strings" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/result" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/result" ) type table struct { diff --git a/mysql/connection.go b/mysql/connection.go index 68d583c5..faa3b4cf 100644 --- a/mysql/connection.go +++ b/mysql/connection.go @@ -26,7 +26,7 @@ import ( "net/url" "strings" - "upper.io/v2/db" + "upper.io/db" ) const defaultPort = 3306 diff --git a/mysql/connection_test.go b/mysql/connection_test.go index f700c9e6..1e833d1e 100644 --- a/mysql/connection_test.go +++ b/mysql/connection_test.go @@ -24,7 +24,7 @@ package mysql import ( "testing" - "upper.io/v2/db" + "upper.io/db" ) func TestConnectionURL(t *testing.T) { diff --git a/mysql/database.go b/mysql/database.go index 8bcb7ebb..df840b22 100644 --- a/mysql/database.go +++ b/mysql/database.go @@ -28,11 +28,11 @@ import ( _ "github.com/go-sql-driver/mysql" // MySQL driver. "github.com/jmoiron/sqlx" - "upper.io/v2/db" - "upper.io/v2/db/util/schema" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/tx" + "upper.io/db" + "upper.io/db/util/schema" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/tx" ) var ( diff --git a/mysql/database_test.go b/mysql/database_test.go index f3c9cc78..5fd4d163 100644 --- a/mysql/database_test.go +++ b/mysql/database_test.go @@ -35,8 +35,8 @@ import ( "github.com/jmoiron/sqlx" "menteslibres.net/gosexy/to" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlutil" ) const ( diff --git a/mysql/mysql.go b/mysql/mysql.go index 9d48672a..c6791206 100644 --- a/mysql/mysql.go +++ b/mysql/mysql.go @@ -19,13 +19,13 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -package mysql // import "upper.io/v2/db/mysql" +package mysql // import "upper.io/db/mysql" import ( "upper.io/cache" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" ) // Adapter is the public name of the adapter. diff --git a/postgresql/README.md b/postgresql/README.md index 2c1e7201..f374a92b 100644 --- a/postgresql/README.md +++ b/postgresql/README.md @@ -1,6 +1,6 @@ -# PostgreSQL adapter for upper.io/v2/db +# PostgreSQL adapter for upper.io/db Please read the full docs, acknowledgements and examples at -[https://upper.io/v2/db/postgresql][1] +[https://upper.io/db/postgresql][1] -[1]: https://upper.io/v2/db/postgresql +[1]: https://upper.io/db/postgresql diff --git a/postgresql/_example/main.go b/postgresql/_example/main.go index a1e91606..63777145 100644 --- a/postgresql/_example/main.go +++ b/postgresql/_example/main.go @@ -5,8 +5,8 @@ import ( "log" "time" - "upper.io/v2/db" // Imports the main db package. - _ "upper.io/v2/db/postgresql" // Imports the postgresql adapter. + "upper.io/db" // Imports the main db package. + _ "upper.io/db/postgresql" // Imports the postgresql adapter. ) var settings = db.Settings{ diff --git a/postgresql/collection.go b/postgresql/collection.go index 5f10d9f7..0158c17d 100644 --- a/postgresql/collection.go +++ b/postgresql/collection.go @@ -27,10 +27,10 @@ import ( "strings" "github.com/jmoiron/sqlx" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/result" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/result" ) type table struct { diff --git a/postgresql/connection.go b/postgresql/connection.go index 4758a902..451383ce 100644 --- a/postgresql/connection.go +++ b/postgresql/connection.go @@ -28,7 +28,7 @@ import ( "unicode" "github.com/lib/pq" - "upper.io/v2/db" + "upper.io/db" ) // scanner implements a tokenizer for libpq-style option strings. diff --git a/postgresql/connection_test.go b/postgresql/connection_test.go index 2600b613..dd6cc0d1 100644 --- a/postgresql/connection_test.go +++ b/postgresql/connection_test.go @@ -24,7 +24,7 @@ package postgresql import ( "testing" - "upper.io/v2/db" + "upper.io/db" ) func TestConnectionURL(t *testing.T) { diff --git a/postgresql/database.go b/postgresql/database.go index 4a03989b..a95c014c 100644 --- a/postgresql/database.go +++ b/postgresql/database.go @@ -30,11 +30,11 @@ import ( "github.com/jmoiron/sqlx" _ "github.com/lib/pq" // PostgreSQL driver. - "upper.io/v2/db" - "upper.io/v2/db/util/schema" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/tx" + "upper.io/db" + "upper.io/db/util/schema" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/tx" ) var ( diff --git a/postgresql/database_test.go b/postgresql/database_test.go index 45f0b818..1dc7c3ca 100644 --- a/postgresql/database_test.go +++ b/postgresql/database_test.go @@ -35,8 +35,8 @@ import ( "math/rand" "github.com/jmoiron/sqlx" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlutil" ) const ( diff --git a/postgresql/postgresql.go b/postgresql/postgresql.go index f15ef870..9f4a90e5 100644 --- a/postgresql/postgresql.go +++ b/postgresql/postgresql.go @@ -19,13 +19,13 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -package postgresql // import "upper.io/v2/db/postgresql" +package postgresql // import "upper.io/db/postgresql" import ( "upper.io/cache" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" ) // Adapter is the public name of the adapter. diff --git a/ql/_example/main.go b/ql/_example/main.go index 33a1c75f..297caef5 100644 --- a/ql/_example/main.go +++ b/ql/_example/main.go @@ -5,8 +5,8 @@ import ( "log" "time" - "upper.io/v2/db" // Imports the main db package. - _ "upper.io/v2/db/ql" // Imports the ql adapter. + "upper.io/db" // Imports the main db package. + _ "upper.io/db/ql" // Imports the ql adapter. ) var settings = db.Settings{ diff --git a/ql/collection.go b/ql/collection.go index 68b9cb3b..53a5d4c1 100644 --- a/ql/collection.go +++ b/ql/collection.go @@ -26,10 +26,10 @@ import ( "reflect" "strings" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/result" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/result" ) type table struct { diff --git a/ql/database.go b/ql/database.go index 0892610d..c6529044 100644 --- a/ql/database.go +++ b/ql/database.go @@ -29,11 +29,11 @@ import ( _ "github.com/cznic/ql/driver" // QL driver "github.com/jmoiron/sqlx" - "upper.io/v2/db" - "upper.io/v2/db/util/schema" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/tx" + "upper.io/db" + "upper.io/db/util/schema" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/tx" ) var ( diff --git a/ql/database_test.go b/ql/database_test.go index 861dfedf..bc97d167 100644 --- a/ql/database_test.go +++ b/ql/database_test.go @@ -41,8 +41,8 @@ import ( "time" "github.com/jmoiron/sqlx" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlutil" ) const ( diff --git a/ql/ql.go b/ql/ql.go index ce474954..c8c37011 100644 --- a/ql/ql.go +++ b/ql/ql.go @@ -19,13 +19,13 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -package ql // import "upper.io/v2/db/ql" +package ql // import "upper.io/db/ql" import ( "upper.io/cache" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" ) // Adapter is the public name of the adapter. diff --git a/sqlite/README.md b/sqlite/README.md index 747a79d6..1c604de9 100644 --- a/sqlite/README.md +++ b/sqlite/README.md @@ -1,6 +1,6 @@ -# SQLite3 adapter for upper.io/v2/db +# SQLite3 adapter for upper.io/db Please read the full docs, acknowledgements and examples at -[https://upper.io/v2/db/sqlite][1] +[https://upper.io/db/sqlite][1] -[1]: https://upper.io/v2/db/sqlite +[1]: https://upper.io/db/sqlite diff --git a/sqlite/_example/main.go b/sqlite/_example/main.go index 90596140..0c5e1541 100644 --- a/sqlite/_example/main.go +++ b/sqlite/_example/main.go @@ -5,8 +5,8 @@ import ( "log" "time" - "upper.io/v2/db" // Imports the main db package. - _ "upper.io/v2/db/sqlite" // Imports the sqlite adapter. + "upper.io/db" // Imports the main db package. + _ "upper.io/db/sqlite" // Imports the sqlite adapter. ) var settings = db.Settings{ diff --git a/sqlite/collection.go b/sqlite/collection.go index aa9c63d3..0aadfcd0 100644 --- a/sqlite/collection.go +++ b/sqlite/collection.go @@ -26,10 +26,10 @@ import ( "database/sql" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/result" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/result" ) type table struct { diff --git a/sqlite/database.go b/sqlite/database.go index 71f76e07..22de80bb 100644 --- a/sqlite/database.go +++ b/sqlite/database.go @@ -29,11 +29,11 @@ import ( "github.com/jmoiron/sqlx" _ "github.com/mattn/go-sqlite3" // SQLite3 driver. - "upper.io/v2/db" - "upper.io/v2/db/util/schema" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" - "upper.io/v2/db/util/sqlutil/tx" + "upper.io/db" + "upper.io/db/util/schema" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" + "upper.io/db/util/sqlutil/tx" ) var ( diff --git a/sqlite/database_test.go b/sqlite/database_test.go index ba54503e..e2296452 100644 --- a/sqlite/database_test.go +++ b/sqlite/database_test.go @@ -42,8 +42,8 @@ import ( "github.com/jmoiron/sqlx" "menteslibres.net/gosexy/to" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlutil" ) const ( diff --git a/sqlite/sqlite.go b/sqlite/sqlite.go index 8ad04fa8..eb423e2a 100644 --- a/sqlite/sqlite.go +++ b/sqlite/sqlite.go @@ -19,13 +19,13 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -package sqlite // import "upper.io/v2/db/sqlite" +package sqlite // import "upper.io/db/sqlite" import ( "upper.io/cache" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" ) // Adapter is the public name of the adapter. diff --git a/util/sqlutil/convert.go b/util/sqlutil/convert.go index 96f2c552..d7bc224c 100644 --- a/util/sqlutil/convert.go +++ b/util/sqlutil/convert.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" "strings" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" + "upper.io/db" + "upper.io/db/util/sqlgen" ) var ( diff --git a/util/sqlutil/debug.go b/util/sqlutil/debug.go index eef4baf6..f82a9857 100644 --- a/util/sqlutil/debug.go +++ b/util/sqlutil/debug.go @@ -27,7 +27,7 @@ import ( "os" "strings" - "upper.io/v2/db" + "upper.io/db" ) // Debug is used for printing SQL queries and arguments. diff --git a/util/sqlutil/fetch.go b/util/sqlutil/fetch.go index 9d1e1bc2..13053d1d 100644 --- a/util/sqlutil/fetch.go +++ b/util/sqlutil/fetch.go @@ -27,7 +27,7 @@ import ( "github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx/reflectx" - "upper.io/v2/db" + "upper.io/db" ) // FetchRow receives a *sqlx.Rows value and tries to map all the rows into a diff --git a/util/sqlutil/result/result.go b/util/sqlutil/result/result.go index 2426cead..7badb0e7 100644 --- a/util/sqlutil/result/result.go +++ b/util/sqlutil/result/result.go @@ -26,9 +26,9 @@ import ( "strings" "github.com/jmoiron/sqlx" - "upper.io/v2/db" - "upper.io/v2/db/util/sqlgen" - "upper.io/v2/db/util/sqlutil" + "upper.io/db" + "upper.io/db/util/sqlgen" + "upper.io/db/util/sqlutil" ) var ( diff --git a/util/sqlutil/result/table.go b/util/sqlutil/result/table.go index 0984adcd..57ec42ac 100644 --- a/util/sqlutil/result/table.go +++ b/util/sqlutil/result/table.go @@ -3,7 +3,7 @@ package result import ( "database/sql" "github.com/jmoiron/sqlx" - "upper.io/v2/db/util/sqlgen" + "upper.io/db/util/sqlgen" ) type DataProvider interface { diff --git a/util/sqlutil/scanner.go b/util/sqlutil/scanner.go index 270a501c..34bde7a0 100644 --- a/util/sqlutil/scanner.go +++ b/util/sqlutil/scanner.go @@ -29,7 +29,7 @@ import ( "strconv" "strings" - "upper.io/v2/db" + "upper.io/db" ) type scanner struct { diff --git a/util/sqlutil/sqlutil.go b/util/sqlutil/sqlutil.go index 9b3ed2b4..4d2b54df 100644 --- a/util/sqlutil/sqlutil.go +++ b/util/sqlutil/sqlutil.go @@ -29,7 +29,7 @@ import ( "strings" "github.com/jmoiron/sqlx/reflectx" - "upper.io/v2/db" + "upper.io/db" ) var ( diff --git a/wrapper.go b/wrapper.go index 8e3d01af..058cf690 100644 --- a/wrapper.go +++ b/wrapper.go @@ -53,7 +53,7 @@ func Open(adapter string, conn ConnectionURL) (Database, error) { if ok == false { // Using panic instead of returning error because attemping to use an // adapter that does not exists will never result in success. - panic(fmt.Sprintf(`Open: Unknown adapter %s. (see: https://upper.io/v2/db#database-adapters)`, adapter)) + panic(fmt.Sprintf(`Open: Unknown adapter %s. (see: https://upper.io/db#database-adapters)`, adapter)) } // Creating a new connection everytime Open() is called. -- GitLab