Repository: upper/db
Pull request #579 (2020-07-06 01:40:37)

v4 addition: go modules and use github.com/upper/db/v4 path throughout


Patch:
diff --git a/README.md b/README.md
index 4f1ceff..69d0bac 100644
--- a/README.md
+++ b/README.md
@@ -5,14 +5,19 @@
 # upper/db [![Build Status](https://travis-ci.org/upper/db.svg?branch=v4)](https://travis-ci.org/upper/db) [![GoDoc](https://godoc.org/github.com/upper/db?status.svg)](https://godoc.org/github.com/upper/db)
 
 `upper/db` is a productive data access layer (DAL) for [Go](https://golang.org)
-that provides agnostic tools to work with different data sources, such as
-[PostgreSQL](https://upper.io/db.v3/postgresql),
-[MySQL](https://upper.io/db.v3/mysql), [SQLite](https://upper.io/db.v3/sqlite),
-[MSSQL](https://upper.io/db.v3/mssql), [QL](https://upper.io/db.v3/ql) and
-[MongoDB](https://upper.io/db.v3/mongo).
+that provides agnostic tools to work with different data sources, such as:
+* PostgreSQL
+* MySQL
+* MSSQL
+* CockroachDB
+* MongoDB
+* QL
+* SQLite
+
+## Install
 
 ```
-go get github.com/upper/db
+go get github.com/upper/db/v4
 ```
 
 ## The tour
@@ -32,7 +37,7 @@ package main
 import (
 	"log"
 
-	"github.com/upper/db/adapter/postgresql"
+	"github.com/upper/db/v4/adapter/postgresql"
 )
 
 var settings = postgresql.ConnectionURL{
@@ -74,4 +79,4 @@ Licensed under [MIT License](./LICENSE)
 
 ## Contributors
 
-See the [https://github.com/upper/db/graphs/contributors](list of contributors).
+See the [list of contributors](https://github.com/upper/db/graphs/contributors).
diff --git a/adapter/cockroachdb/cockroachdb.go b/adapter/cockroachdb/cockroachdb.go
index b1a58df..627e6c4 100644
--- a/adapter/cockroachdb/cockroachdb.go
+++ b/adapter/cockroachdb/cockroachdb.go
@@ -19,14 +19,14 @@
 // 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 cockroachdb // import "github.com/upper/db/adapter/cockroachdb"
+package cockroachdb
 
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Adapter is the unique name that you can use to refer to this adapter.
diff --git a/adapter/cockroachdb/collection.go b/adapter/cockroachdb/collection.go
index 7bcec13..c2ed5eb 100644
--- a/adapter/cockroachdb/collection.go
+++ b/adapter/cockroachdb/collection.go
@@ -22,8 +22,8 @@
 package cockroachdb
 
 import (
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
 )
 
 type collectionAdapter struct {
diff --git a/adapter/cockroachdb/custom_types.go b/adapter/cockroachdb/custom_types.go
index 9ce36f1..8ea7cd1 100644
--- a/adapter/cockroachdb/custom_types.go
+++ b/adapter/cockroachdb/custom_types.go
@@ -28,7 +28,7 @@ import (
 	"reflect"
 
 	"github.com/lib/pq"
-	"github.com/upper/db/sqlbuilder"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Array returns a sqlbuilder.ScannerValuer for any given slice. Slice elements
diff --git a/adapter/cockroachdb/database.go b/adapter/cockroachdb/database.go
index 54a666a..a9ce271 100644
--- a/adapter/cockroachdb/database.go
+++ b/adapter/cockroachdb/database.go
@@ -34,10 +34,10 @@ import (
 	"time"
 
 	_ "github.com/lib/pq"
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/sqladapter/exql"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type database struct {
diff --git a/adapter/cockroachdb/template.go b/adapter/cockroachdb/template.go
index a92b3b2..34016b0 100644
--- a/adapter/cockroachdb/template.go
+++ b/adapter/cockroachdb/template.go
@@ -22,9 +22,9 @@
 package cockroachdb
 
 import (
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 const (
diff --git a/adapter/mongo/collection.go b/adapter/mongo/collection.go
index 0d3a7aa..1466953 100644
--- a/adapter/mongo/collection.go
+++ b/adapter/mongo/collection.go
@@ -28,8 +28,8 @@ import (
 
 	"reflect"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/adapter"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/adapter"
 	mgo "gopkg.in/mgo.v2"
 	"gopkg.in/mgo.v2/bson"
 )
diff --git a/adapter/mongo/database.go b/adapter/mongo/database.go
index 94428eb..4bb8a44 100644
--- a/adapter/mongo/database.go
+++ b/adapter/mongo/database.go
@@ -22,15 +22,16 @@
 // Package mongo wraps the gopkg.in/mgo.v2 MongoDB driver. See
 // https://github.com/upper/db/adapter/mongo for documentation, particularities and usage
 // examples.
-package mongo // import "github.com/upper/db/adapter/mongo"
+package mongo
 
 import (
-	"github.com/upper/db/internal/unsupported"
 	"strings"
 	"sync"
 	"time"
 
-	db "github.com/upper/db"
+	"github.com/upper/db/v4/internal/unsupported"
+
+	db "github.com/upper/db/v4"
 	mgo "gopkg.in/mgo.v2"
 )
 
diff --git a/adapter/mongo/result.go b/adapter/mongo/result.go
index 931a490..5b922c1 100644
--- a/adapter/mongo/result.go
+++ b/adapter/mongo/result.go
@@ -30,12 +30,12 @@ import (
 
 	"encoding/json"
 
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 	mgo "gopkg.in/mgo.v2"
 	"gopkg.in/mgo.v2/bson"
 
-	"github.com/upper/db/internal/immutable"
-	"github.com/upper/db/internal/sqladapter"
+	"github.com/upper/db/v4/internal/immutable"
+	"github.com/upper/db/v4/internal/sqladapter"
 )
 
 type resultQuery struct {
diff --git a/adapter/mssql/collection.go b/adapter/mssql/collection.go
index 2d8ac99..b70ed15 100644
--- a/adapter/mssql/collection.go
+++ b/adapter/mssql/collection.go
@@ -22,9 +22,9 @@
 package mssql
 
 import (
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type collectionAdapter struct {
diff --git a/adapter/mssql/database.go b/adapter/mssql/database.go
index 4d8c8b2..4b7df21 100644
--- a/adapter/mssql/database.go
+++ b/adapter/mssql/database.go
@@ -30,9 +30,9 @@ import (
 	"database/sql"
 
 	_ "github.com/denisenkom/go-mssqldb" // MSSQL driver
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/sqladapter/exql"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 type database struct {
diff --git a/adapter/mssql/mssql.go b/adapter/mssql/mssql.go
index d97aae1..95dbaa2 100644
--- a/adapter/mssql/mssql.go
+++ b/adapter/mssql/mssql.go
@@ -19,14 +19,14 @@
 // 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 mssql // import "github.com/upper/db/adapter/mssql"
+package mssql
 
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Adapter is the public name of the adapter.
diff --git a/adapter/mssql/template.go b/adapter/mssql/template.go
index d5c6874..b697de7 100644
--- a/adapter/mssql/template.go
+++ b/adapter/mssql/template.go
@@ -22,8 +22,8 @@
 package mssql
 
 import (
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 const (
diff --git a/adapter/mysql/collection.go b/adapter/mysql/collection.go
index 6d31403..c4d14ab 100644
--- a/adapter/mysql/collection.go
+++ b/adapter/mysql/collection.go
@@ -22,9 +22,9 @@
 package mysql
 
 import (
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type collectionAdapter struct {
diff --git a/adapter/mysql/custom_types.go b/adapter/mysql/custom_types.go
index 624bccc..76471fc 100644
--- a/adapter/mysql/custom_types.go
+++ b/adapter/mysql/custom_types.go
@@ -27,7 +27,7 @@ import (
 	"errors"
 	"reflect"
 
-	"github.com/upper/db/sqlbuilder"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // JSON represents a MySQL's JSON value:
diff --git a/adapter/mysql/database.go b/adapter/mysql/database.go
index 7b2cff1..0777ac1 100644
--- a/adapter/mysql/database.go
+++ b/adapter/mysql/database.go
@@ -33,10 +33,10 @@ import (
 	"database/sql"
 
 	_ "github.com/go-sql-driver/mysql" // MySQL driver.
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/sqladapter/exql"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // database is the actual implementation of Database
diff --git a/adapter/mysql/mysql.go b/adapter/mysql/mysql.go
index 1c66c63..39b90d3 100644
--- a/adapter/mysql/mysql.go
+++ b/adapter/mysql/mysql.go
@@ -19,14 +19,14 @@
 // 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 "github.com/upper/db/adapter/mysql"
+package mysql
 
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Adapter is the public name of the adapter.
diff --git a/adapter/mysql/template.go b/adapter/mysql/template.go
index 4efd5aa..93e0012 100644
--- a/adapter/mysql/template.go
+++ b/adapter/mysql/template.go
@@ -22,8 +22,8 @@
 package mysql
 
 import (
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 const (
diff --git a/adapter/postgresql/collection.go b/adapter/postgresql/collection.go
index 29c9218..1841f60 100644
--- a/adapter/postgresql/collection.go
+++ b/adapter/postgresql/collection.go
@@ -22,8 +22,8 @@
 package postgresql
 
 import (
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
 )
 
 type collectionAdapter struct {
diff --git a/adapter/postgresql/custom_types.go b/adapter/postgresql/custom_types.go
index 2d1292c..ead6a2d 100644
--- a/adapter/postgresql/custom_types.go
+++ b/adapter/postgresql/custom_types.go
@@ -28,7 +28,7 @@ import (
 	"reflect"
 
 	"github.com/lib/pq"
-	"github.com/upper/db/sqlbuilder"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Array returns a sqlbuilder.ScannerValuer for any given slice. Slice elements
diff --git a/adapter/postgresql/database.go b/adapter/postgresql/database.go
index 64fa74c..32a3b3e 100644
--- a/adapter/postgresql/database.go
+++ b/adapter/postgresql/database.go
@@ -33,10 +33,10 @@ import (
 	"time"
 
 	_ "github.com/lib/pq" // PostgreSQL driver.
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/sqladapter/exql"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type database struct {
diff --git a/adapter/postgresql/postgresql.go b/adapter/postgresql/postgresql.go
index e3aec73..ff69f23 100644
--- a/adapter/postgresql/postgresql.go
+++ b/adapter/postgresql/postgresql.go
@@ -19,14 +19,14 @@
 // 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 "github.com/upper/db/adapter/postgresql"
+package postgresql
 
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Adapter is the internal name of the adapter.
diff --git a/adapter/postgresql/template.go b/adapter/postgresql/template.go
index f960f4c..59898d3 100644
--- a/adapter/postgresql/template.go
+++ b/adapter/postgresql/template.go
@@ -22,9 +22,9 @@
 package postgresql
 
 import (
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 const (
diff --git a/adapter/ql/collection.go b/adapter/ql/collection.go
index e2b1800..e708a91 100644
--- a/adapter/ql/collection.go
+++ b/adapter/ql/collection.go
@@ -24,9 +24,9 @@ package ql
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type resultProxy struct {
diff --git a/adapter/ql/database.go b/adapter/ql/database.go
index 38a1840..6f3e139 100644
--- a/adapter/ql/database.go
+++ b/adapter/ql/database.go
@@ -29,11 +29,11 @@ import (
 	"database/sql"
 	"strings"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/sqladapter/compat"
-	"github.com/upper/db/internal/sqladapter/exql"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/sqladapter/compat"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
+	"github.com/upper/db/v4/sqlbuilder"
 	_ "modernc.org/ql/driver" // QL driver
 )
 
diff --git a/adapter/ql/ql.go b/adapter/ql/ql.go
index e480829..6e49473 100644
--- a/adapter/ql/ql.go
+++ b/adapter/ql/ql.go
@@ -19,14 +19,14 @@
 // 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 "github.com/upper/db/adapter/ql"
+package ql
 
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Adapter is the public name of the adapter.
diff --git a/adapter/ql/template.go b/adapter/ql/template.go
index 2dd1bbd..be5e9bf 100644
--- a/adapter/ql/template.go
+++ b/adapter/ql/template.go
@@ -22,9 +22,9 @@
 package ql
 
 import (
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 const (
diff --git a/adapter/sqlite/collection.go b/adapter/sqlite/collection.go
index 2aac6e3..e5b44f0 100644
--- a/adapter/sqlite/collection.go
+++ b/adapter/sqlite/collection.go
@@ -24,9 +24,9 @@ package sqlite
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type collectionAdapter struct {
diff --git a/adapter/sqlite/database.go b/adapter/sqlite/database.go
index 9895a33..80e5c48 100644
--- a/adapter/sqlite/database.go
+++ b/adapter/sqlite/database.go
@@ -30,11 +30,11 @@ import (
 	"fmt"
 
 	_ "github.com/mattn/go-sqlite3" // SQLite3 driver.
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/sqladapter/compat"
-	"github.com/upper/db/internal/sqladapter/exql"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/sqladapter/compat"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // database is the actual implementation of Database
diff --git a/adapter/sqlite/sqlite.go b/adapter/sqlite/sqlite.go
index 2b00a55..948187a 100644
--- a/adapter/sqlite/sqlite.go
+++ b/adapter/sqlite/sqlite.go
@@ -19,15 +19,15 @@
 // 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 "github.com/upper/db/adapter/sqlite"
+package sqlite
 
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/sqlbuilder"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // Adapter is the public name of the adapter.
diff --git a/adapter/sqlite/template.go b/adapter/sqlite/template.go
index eb062d6..a128fa3 100644
--- a/adapter/sqlite/template.go
+++ b/adapter/sqlite/template.go
@@ -22,8 +22,8 @@
 package sqlite
 
 import (
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 const (
diff --git a/comparison.go b/comparison.go
index 64e4f74..df40644 100644
--- a/comparison.go
+++ b/comparison.go
@@ -25,7 +25,7 @@ import (
 	"reflect"
 	"time"
 
-	"github.com/upper/db/internal/adapter"
+	"github.com/upper/db/v4/internal/adapter"
 )
 
 // Comparison represents a relationship between values.
diff --git a/cond.go b/cond.go
index 9e1c3f2..cd8c070 100644
--- a/cond.go
+++ b/cond.go
@@ -25,7 +25,7 @@ import (
 	"fmt"
 	"sort"
 
-	"github.com/upper/db/internal/adapter"
+	"github.com/upper/db/v4/internal/adapter"
 )
 
 // LogicalExpr represents an expression to be used in logical statements.
diff --git a/db.go b/db.go
index 3ddb8eb..dc882b7 100644
--- a/db.go
+++ b/db.go
@@ -33,7 +33,7 @@
 //  import (
 //  	"log"
 //
-//  	"github.com/upper/db/adapter/postgresql" // Imports the postgresql adapter.
+//  	"github.com/upper/db/v4/adapter/postgresql" // Imports the postgresql adapter.
 //  )
 //
 //  var settings = postgresql.ConnectionURL{
@@ -68,4 +68,4 @@
 //  		log.Printf("%q (ID: %d)\n", book.Title, book.ID)
 //  	}
 //  }
-package db // import "github.com/upper/db"
+package db
diff --git a/function.go b/function.go
index a304ae0..d0a11f9 100644
--- a/function.go
+++ b/function.go
@@ -22,7 +22,7 @@
 package db
 
 import (
-	"github.com/upper/db/internal/adapter"
+	"github.com/upper/db/v4/internal/adapter"
 )
 
 // FuncExpr represents functions.
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..b7d910c
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,17 @@
+module github.com/upper/db/v4
+
+go 1.14
+
+require (
+	github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec
+	github.com/go-sql-driver/mysql v1.5.0
+	github.com/golang/snappy v0.0.1 // indirect
+	github.com/google/uuid v1.1.1
+	github.com/lib/pq v1.7.0
+	github.com/mattn/go-sqlite3 v1.14.0
+	github.com/sirupsen/logrus v1.6.0
+	github.com/stretchr/testify v1.6.1
+	gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
+	gopkg.in/yaml.v2 v2.3.0 // indirect
+	modernc.org/ql v1.1.0
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..a615af3
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,89 @@
+github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
+github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec h1:NfhRXXFDPxcF5Cwo06DzeIaE7uuJtAUhsDwH3LNsjos=
+github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
+github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 h1:aaQcKT9WumO6JEJcRyTqFVq4XUZiUcKR2/GI31TOcz8=
+github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
+github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
+github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
+github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
+github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
+github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/lib/pq v1.7.0 h1:h93mCPfUSkaul3Ka/VG8uZdmW1uMHDGxzu0NWHuJmHY=
+github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
+github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA=
+github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446 h1:/NRJ5vAYoqz+7sG51ubIDHXeWO8DlTSrToPu6q11ziA=
+github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
+github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
+github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+gitlab.com/cznic/ebnf2y v1.0.0/go.mod h1:jx14dqOldV2pRvSi8HASTB/k5fkIv2TwjYAp5py0MTs=
+gitlab.com/cznic/golex v1.0.0/go.mod h1:vkWdDgqbbThjRHoOLU7yNPgMxaubAkwnvF/4zeG8cvU=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0FNOmBrHfq7vN4btdGoDZgI=
+golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/exp v0.0.0-20190411193353-0480eff6dd7c/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
+golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
+golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
+golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
+gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+modernc.org/b v1.0.0 h1:vpvqeyp17ddcQWF29Czawql4lDdABCDRbXRAS4+aF2o=
+modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg=
+modernc.org/db v1.0.0 h1:2c6NdCfaLnshSvY7OU09cyAY0gYXUZj4lmg5ItHyucg=
+modernc.org/db v1.0.0/go.mod h1:kYD/cO29L/29RM0hXYl4i3+Q5VojL31kTUVpVJDw0s8=
+modernc.org/ebnfutil v1.0.0/go.mod h1:+2n/OnQXoild9pzrPa/2wmVtR+ufWjB/0fYkc0BV9sc=
+modernc.org/file v1.0.0 h1:9/PdvjVxd5+LcWUQIfapAWRGOkDLK90rloa8s/au06A=
+modernc.org/file v1.0.0/go.mod h1:uqEokAEn1u6e+J45e54dsEA/pw4o7zLrA2GwyntZzjw=
+modernc.org/fileutil v1.0.0 h1:Z1AFLZwl6BO8A5NldQg/xTSjGLetp+1Ubvl4alfGx8w=
+modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8=
+modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE=
+modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
+modernc.org/internal v1.0.0 h1:XMDsFDcBDsibbBnHB2xzljZ+B1yrOVLEFkKL2u15Glw=
+modernc.org/internal v1.0.0/go.mod h1:VUD/+JAkhCpvkUitlEOnhpVxCgsBI90oTzSCRcqQVSM=
+modernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk=
+modernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk=
+modernc.org/lldb v1.0.0 h1:6vjDJxQEfhlOLwl4bhpwIz00uyFK4EmSYcbwqwbynsc=
+modernc.org/lldb v1.0.0/go.mod h1:jcRvJGWfCGodDZz8BPwiKMJxGJngQ/5DrRapkQnLob8=
+modernc.org/mathutil v1.0.0 h1:93vKjrJopTPrtTNpZ8XIovER7iCIH1QU7wNbOQXC60I=
+modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
+modernc.org/ql v1.1.0 h1:TUkpkmUf6562EZPTB1DH+EhJdE6265maYFS+eemhn08=
+modernc.org/ql v1.1.0/go.mod h1:Fj1ylcVyzcu/fgWZTrvBO9j/aEUg/ixLFnGtmzh7quI=
+modernc.org/sortutil v1.0.0 h1:SUTM1sCR0Ldpv7dbB/KCPC2zHHsZ1KrSkhmGmmV22CQ=
+modernc.org/sortutil v1.0.0/go.mod h1:1QO0q8IlIlmjBIwm6t/7sof874+xCfZouyqZMLIAtxM=
+modernc.org/strutil v1.0.0 h1:XVFtQwFVwc02Wk+0L/Z/zDDXO81r5Lhe6iMKmGX3KhE=
+modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
+modernc.org/zappy v1.0.0 h1:dPVaP+3ueIUv4guk8PuZ2wiUGcJ1WUVvIheeSSTD0yk=
+modernc.org/zappy v1.0.0/go.mod h1:hHe+oGahLVII/aTTyWK/b53VDHMAGCBYYeZ9sn83HC4=
diff --git a/internal/adapter/logical_expr.go b/internal/adapter/logical_expr.go
index ea33605..30f898c 100644
--- a/internal/adapter/logical_expr.go
+++ b/internal/adapter/logical_expr.go
@@ -22,7 +22,7 @@
 package adapter
 
 import (
-	"github.com/upper/db/internal/immutable"
+	"github.com/upper/db/v4/internal/immutable"
 )
 
 // LogicalExpr represents a group formed by one or more sentences joined by
diff --git a/internal/cache/cache.go b/internal/cache/cache.go
index 255e97c..fbf0353 100644
--- a/internal/cache/cache.go
+++ b/internal/cache/cache.go
@@ -28,7 +28,7 @@ import (
 	"strconv"
 	"sync"
 
-	"github.com/upper/db/internal/cache/hashstructure"
+	"github.com/upper/db/v4/internal/cache/hashstructure"
 )
 
 const defaultCapacity = 128
diff --git a/internal/sqladapter/collection.go b/internal/sqladapter/collection.go
index 9df25c4..d7da5fa 100644
--- a/internal/sqladapter/collection.go
+++ b/internal/sqladapter/collection.go
@@ -4,9 +4,9 @@ import (
 	"fmt"
 	"reflect"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter/exql"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // CollectionAdapter defines methods to be implemented by SQL adapters.
diff --git a/internal/sqladapter/database.go b/internal/sqladapter/database.go
index defc688..2a9dedb 100644
--- a/internal/sqladapter/database.go
+++ b/internal/sqladapter/database.go
@@ -9,11 +9,11 @@ import (
 	"sync/atomic"
 	"time"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/compat"
-	"github.com/upper/db/internal/sqladapter/exql"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/compat"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var (
diff --git a/internal/sqladapter/exql/default.go b/internal/sqladapter/exql/default.go
index 674da30..8d3a001 100644
--- a/internal/sqladapter/exql/default.go
+++ b/internal/sqladapter/exql/default.go
@@ -1,7 +1,7 @@
 package exql
 
 import (
-	"github.com/upper/db/internal/cache"
+	"github.com/upper/db/v4/internal/cache"
 )
 
 const (
diff --git a/internal/sqladapter/exql/hash.go b/internal/sqladapter/exql/hash.go
index aad1911..7459023 100644
--- a/internal/sqladapter/exql/hash.go
+++ b/internal/sqladapter/exql/hash.go
@@ -4,7 +4,7 @@ import (
 	"reflect"
 	"sync/atomic"
 
-	"github.com/upper/db/internal/cache"
+	"github.com/upper/db/v4/internal/cache"
 )
 
 type hash struct {
diff --git a/internal/sqladapter/exql/interfaces.go b/internal/sqladapter/exql/interfaces.go
index 36a6866..1f38d86 100644
--- a/internal/sqladapter/exql/interfaces.go
+++ b/internal/sqladapter/exql/interfaces.go
@@ -1,7 +1,7 @@
 package exql
 
 import (
-	"github.com/upper/db/internal/cache"
+	"github.com/upper/db/v4/internal/cache"
 )
 
 // Fragment is any interface that can be both cached and compiled.
diff --git a/internal/sqladapter/exql/template.go b/internal/sqladapter/exql/template.go
index 2055801..8628912 100644
--- a/internal/sqladapter/exql/template.go
+++ b/internal/sqladapter/exql/template.go
@@ -6,8 +6,8 @@ import (
 	"sync"
 	"text/template"
 
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/cache"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/cache"
 )
 
 // Type is the type of SQL query the statement represents.
diff --git a/internal/sqladapter/item.go b/internal/sqladapter/item.go
index 6597099..a3193d5 100644
--- a/internal/sqladapter/item.go
+++ b/internal/sqladapter/item.go
@@ -3,8 +3,8 @@ package sqladapter
 import (
 	"reflect"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type item struct {
diff --git a/internal/sqladapter/result.go b/internal/sqladapter/result.go
index 4a71880..6b462d4 100644
--- a/internal/sqladapter/result.go
+++ b/internal/sqladapter/result.go
@@ -25,9 +25,9 @@ import (
 	"sync"
 	"sync/atomic"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/immutable"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/immutable"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type Result struct {
diff --git a/internal/sqladapter/sqladapter.go b/internal/sqladapter/sqladapter.go
index 7efd471..52d778b 100644
--- a/internal/sqladapter/sqladapter.go
+++ b/internal/sqladapter/sqladapter.go
@@ -25,8 +25,9 @@ package sqladapter
 import (
 	"database/sql"
 	"database/sql/driver"
-	"github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+
+	"github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // IsKeyValue reports whether v is a valid value for a primary key that can be
diff --git a/internal/sqladapter/tx.go b/internal/sqladapter/tx.go
index df04d2f..817a671 100644
--- a/internal/sqladapter/tx.go
+++ b/internal/sqladapter/tx.go
@@ -26,8 +26,8 @@ import (
 	"database/sql"
 	"sync/atomic"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 // SessionTx represents a database session within a transaction.
diff --git a/internal/unsupported/item.go b/internal/unsupported/item.go
index 72f03aa..f21dbd8 100644
--- a/internal/unsupported/item.go
+++ b/internal/unsupported/item.go
@@ -22,7 +22,7 @@
 package unsupported
 
 import (
-	"github.com/upper/db"
+	"github.com/upper/db/v4"
 )
 
 type Item struct {
diff --git a/intersection.go b/intersection.go
index 7babc82..3478ba0 100644
--- a/intersection.go
+++ b/intersection.go
@@ -22,7 +22,7 @@
 package db
 
 import (
-	"github.com/upper/db/internal/adapter"
+	"github.com/upper/db/v4/internal/adapter"
 )
 
 // AndExpr represents an expression joined by a logical conjuction (AND).
diff --git a/raw.go b/raw.go
index eca56ae..b7e268e 100644
--- a/raw.go
+++ b/raw.go
@@ -22,7 +22,7 @@
 package db
 
 import (
-	"github.com/upper/db/internal/adapter"
+	"github.com/upper/db/v4/internal/adapter"
 )
 
 // RawExpr represents a raw (non-filtered) expression.
diff --git a/sqlbuilder/builder.go b/sqlbuilder/builder.go
index 4a4966e..63166b0 100644
--- a/sqlbuilder/builder.go
+++ b/sqlbuilder/builder.go
@@ -34,11 +34,11 @@ import (
 	"strconv"
 	"strings"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/reflectx"
-	"github.com/upper/db/internal/sqladapter/compat"
-	"github.com/upper/db/internal/sqladapter/exql"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/reflectx"
+	"github.com/upper/db/v4/internal/sqladapter/compat"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 // MapOptions represents options for the mapper.
diff --git a/sqlbuilder/comparison.go b/sqlbuilder/comparison.go
index fca4fea..ebaf06b 100644
--- a/sqlbuilder/comparison.go
+++ b/sqlbuilder/comparison.go
@@ -4,9 +4,9 @@ import (
 	"fmt"
 	"strings"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/sqladapter/exql"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 var comparisonOperators = map[adapter.ComparisonOperator]string{
diff --git a/sqlbuilder/convert.go b/sqlbuilder/convert.go
index 093ccce..1fe76c3 100644
--- a/sqlbuilder/convert.go
+++ b/sqlbuilder/convert.go
@@ -5,8 +5,8 @@ import (
 	"reflect"
 	"strings"
 
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 var (
diff --git a/sqlbuilder/delete.go b/sqlbuilder/delete.go
index 0f97d74..779bc2e 100644
--- a/sqlbuilder/delete.go
+++ b/sqlbuilder/delete.go
@@ -4,8 +4,8 @@ import (
 	"context"
 	"database/sql"
 
-	"github.com/upper/db/internal/immutable"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/immutable"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 type deleterQuery struct {
diff --git a/sqlbuilder/fetch.go b/sqlbuilder/fetch.go
index 9d3ebe8..f6effa4 100644
--- a/sqlbuilder/fetch.go
+++ b/sqlbuilder/fetch.go
@@ -24,8 +24,8 @@ package sqlbuilder
 import (
 	"reflect"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/reflectx"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/reflectx"
 )
 
 type hasConvertValues interface {
diff --git a/sqlbuilder/insert.go b/sqlbuilder/insert.go
index 4601bc3..0005f16 100644
--- a/sqlbuilder/insert.go
+++ b/sqlbuilder/insert.go
@@ -4,8 +4,8 @@ import (
 	"context"
 	"database/sql"
 
-	"github.com/upper/db/internal/immutable"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/immutable"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 type inserterQuery struct {
diff --git a/sqlbuilder/paginate.go b/sqlbuilder/paginate.go
index ad2506d..17c24c3 100644
--- a/sqlbuilder/paginate.go
+++ b/sqlbuilder/paginate.go
@@ -7,8 +7,8 @@ import (
 	"math"
 	"strings"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/immutable"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/immutable"
 )
 
 var (
diff --git a/sqlbuilder/scanner.go b/sqlbuilder/scanner.go
index 98784e1..8f592b8 100644
--- a/sqlbuilder/scanner.go
+++ b/sqlbuilder/scanner.go
@@ -24,7 +24,7 @@ package sqlbuilder
 import (
 	"database/sql"
 
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 )
 
 type scanner struct {
diff --git a/sqlbuilder/select.go b/sqlbuilder/select.go
index 85e0972..0daddc7 100644
--- a/sqlbuilder/select.go
+++ b/sqlbuilder/select.go
@@ -7,9 +7,9 @@ import (
 	"fmt"
 	"strings"
 
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/immutable"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/immutable"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 type selectorQuery struct {
diff --git a/sqlbuilder/sqlbuilder.go b/sqlbuilder/sqlbuilder.go
index a78cced..67fad7e 100644
--- a/sqlbuilder/sqlbuilder.go
+++ b/sqlbuilder/sqlbuilder.go
@@ -3,7 +3,8 @@ package sqlbuilder
 import (
 	"database/sql"
 	"fmt"
-	"github.com/upper/db"
+
+	"github.com/upper/db/v4"
 )
 
 // Engine represents a SQL database engine.
diff --git a/sqlbuilder/template.go b/sqlbuilder/template.go
index d03bc5a..d89ab02 100644
--- a/sqlbuilder/template.go
+++ b/sqlbuilder/template.go
@@ -5,9 +5,9 @@ import (
 	"fmt"
 	"strings"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/adapter"
-	"github.com/upper/db/internal/sqladapter/exql"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/adapter"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 type templateWithUtils struct {
diff --git a/sqlbuilder/update.go b/sqlbuilder/update.go
index b100178..0cbbd43 100644
--- a/sqlbuilder/update.go
+++ b/sqlbuilder/update.go
@@ -4,8 +4,8 @@ import (
 	"context"
 	"database/sql"
 
-	"github.com/upper/db/internal/immutable"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/immutable"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 type updaterQuery struct {
diff --git a/sqlbuilder/wrapper.go b/sqlbuilder/wrapper.go
index c738580..efef4a1 100644
--- a/sqlbuilder/wrapper.go
+++ b/sqlbuilder/wrapper.go
@@ -25,7 +25,7 @@ import (
 	"context"
 	"database/sql"
 
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 )
 
 // Tx represents a transaction on a SQL database. A transaction is like a
diff --git a/union.go b/union.go
index 0cb6eb8..0216ab1 100644
--- a/union.go
+++ b/union.go
@@ -22,7 +22,7 @@
 package db
 
 import (
-	"github.com/upper/db/internal/adapter"
+	"github.com/upper/db/v4/internal/adapter"
 )
 
 // OrExpr represents a logical expression joined by logical disjunction (OR).


Test patch:
diff --git a/adapter/cockroachdb/bond_test.go b/adapter/cockroachdb/bond_test.go
index cdc1c7f..a572c82 100644
--- a/adapter/cockroachdb/bond_test.go
+++ b/adapter/cockroachdb/bond_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type BondTests struct {
diff --git a/adapter/cockroachdb/cockroachdb_test.go b/adapter/cockroachdb/cockroachdb_test.go
index 861ff0a..051a01e 100644
--- a/adapter/cockroachdb/cockroachdb_test.go
+++ b/adapter/cockroachdb/cockroachdb_test.go
@@ -36,9 +36,9 @@ import (
 	"github.com/google/uuid"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/suite"
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type customJSONB struct {
diff --git a/adapter/cockroachdb/generic_test.go b/adapter/cockroachdb/generic_test.go
index 767f5fc..80296a0 100644
--- a/adapter/cockroachdb/generic_test.go
+++ b/adapter/cockroachdb/generic_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type GenericTests struct {
diff --git a/adapter/cockroachdb/helper_test.go b/adapter/cockroachdb/helper_test.go
index abc8b22..6fb3644 100644
--- a/adapter/cockroachdb/helper_test.go
+++ b/adapter/cockroachdb/helper_test.go
@@ -26,10 +26,10 @@ import (
 	"fmt"
 	"os"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var settings = ConnectionURL{
diff --git a/adapter/cockroachdb/sql_test.go b/adapter/cockroachdb/sql_test.go
index fa8a533..6044821 100644
--- a/adapter/cockroachdb/sql_test.go
+++ b/adapter/cockroachdb/sql_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type SQLTests struct {
diff --git a/adapter/cockroachdb/template_test.go b/adapter/cockroachdb/template_test.go
index 76188a5..7428693 100644
--- a/adapter/cockroachdb/template_test.go
+++ b/adapter/cockroachdb/template_test.go
@@ -4,8 +4,8 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 func TestTemplateSelect(t *testing.T) {
diff --git a/adapter/mongo/generic_test.go b/adapter/mongo/generic_test.go
index fd7e305..20b6821 100644
--- a/adapter/mongo/generic_test.go
+++ b/adapter/mongo/generic_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type GenericTests struct {
diff --git a/adapter/mongo/helper_test.go b/adapter/mongo/helper_test.go
index bb8bb32..a9151f7 100644
--- a/adapter/mongo/helper_test.go
+++ b/adapter/mongo/helper_test.go
@@ -27,9 +27,9 @@ import (
 
 	mgo "gopkg.in/mgo.v2"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var settings = ConnectionURL{
diff --git a/adapter/mongo/mongo_test.go b/adapter/mongo/mongo_test.go
index 7c1c5d6..65dd1e2 100644
--- a/adapter/mongo/mongo_test.go
+++ b/adapter/mongo/mongo_test.go
@@ -31,8 +31,8 @@ import (
 	"time"
 
 	"github.com/stretchr/testify/suite"
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/testsuite"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/testsuite"
 	"gopkg.in/mgo.v2/bson"
 )
 
diff --git a/adapter/mssql/bond_test.go b/adapter/mssql/bond_test.go
index ae9c467..e573ab9 100644
--- a/adapter/mssql/bond_test.go
+++ b/adapter/mssql/bond_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type BondTests struct {
diff --git a/adapter/mssql/generic_test.go b/adapter/mssql/generic_test.go
index 80ab1f6..65ddc4a 100644
--- a/adapter/mssql/generic_test.go
+++ b/adapter/mssql/generic_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type GenericTests struct {
diff --git a/adapter/mssql/helper_test.go b/adapter/mssql/helper_test.go
index 33304ae..c926560 100644
--- a/adapter/mssql/helper_test.go
+++ b/adapter/mssql/helper_test.go
@@ -25,9 +25,9 @@ import (
 	"database/sql"
 	"os"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var settings = ConnectionURL{
diff --git a/adapter/mssql/sql_test.go b/adapter/mssql/sql_test.go
index fd00b4c..7410508 100644
--- a/adapter/mssql/sql_test.go
+++ b/adapter/mssql/sql_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type SQLTests struct {
diff --git a/adapter/mssql/template_test.go b/adapter/mssql/template_test.go
index 30d1fcb..1a197c5 100644
--- a/adapter/mssql/template_test.go
+++ b/adapter/mssql/template_test.go
@@ -4,8 +4,8 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 func TestTemplateSelect(t *testing.T) {
diff --git a/adapter/mysql/bond_test.go b/adapter/mysql/bond_test.go
index 68384f1..5a46cf9 100644
--- a/adapter/mysql/bond_test.go
+++ b/adapter/mysql/bond_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type BondTests struct {
diff --git a/adapter/mysql/generic_test.go b/adapter/mysql/generic_test.go
index 556a236..7e671f7 100644
--- a/adapter/mysql/generic_test.go
+++ b/adapter/mysql/generic_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type GenericTests struct {
diff --git a/adapter/mysql/helper_test.go b/adapter/mysql/helper_test.go
index fd12657..dd314b2 100644
--- a/adapter/mysql/helper_test.go
+++ b/adapter/mysql/helper_test.go
@@ -27,10 +27,10 @@ import (
 	"os"
 	"time"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var settings = ConnectionURL{
diff --git a/adapter/mysql/mysql_test.go b/adapter/mysql/mysql_test.go
index 6e4961a..58a2164 100644
--- a/adapter/mysql/mysql_test.go
+++ b/adapter/mysql/mysql_test.go
@@ -31,8 +31,8 @@ import (
 	"time"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type int64Compat int64
diff --git a/adapter/mysql/sql_test.go b/adapter/mysql/sql_test.go
index 00a50c4..e0a1757 100644
--- a/adapter/mysql/sql_test.go
+++ b/adapter/mysql/sql_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type SQLTests struct {
diff --git a/adapter/mysql/template_test.go b/adapter/mysql/template_test.go
index 8b76caa..ca56aef 100644
--- a/adapter/mysql/template_test.go
+++ b/adapter/mysql/template_test.go
@@ -4,8 +4,8 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 func TestTemplateSelect(t *testing.T) {
diff --git a/adapter/postgresql/bond_test.go b/adapter/postgresql/bond_test.go
index f558c9d..5aa079e 100644
--- a/adapter/postgresql/bond_test.go
+++ b/adapter/postgresql/bond_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type BondTests struct {
diff --git a/adapter/postgresql/generic_test.go b/adapter/postgresql/generic_test.go
index d69e368..8cd42a4 100644
--- a/adapter/postgresql/generic_test.go
+++ b/adapter/postgresql/generic_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type GenericTests struct {
diff --git a/adapter/postgresql/helper_test.go b/adapter/postgresql/helper_test.go
index c4cea98..f2f1418 100644
--- a/adapter/postgresql/helper_test.go
+++ b/adapter/postgresql/helper_test.go
@@ -26,10 +26,10 @@ import (
 	"fmt"
 	"os"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/sqladapter"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/sqladapter"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var settings = ConnectionURL{
diff --git a/adapter/postgresql/postgresql_test.go b/adapter/postgresql/postgresql_test.go
index d2b0cd5..7f40c38 100644
--- a/adapter/postgresql/postgresql_test.go
+++ b/adapter/postgresql/postgresql_test.go
@@ -36,9 +36,9 @@ import (
 	"github.com/google/uuid"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/suite"
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type customJSONB struct {
diff --git a/adapter/postgresql/sql_test.go b/adapter/postgresql/sql_test.go
index 9b424e2..dd0e591 100644
--- a/adapter/postgresql/sql_test.go
+++ b/adapter/postgresql/sql_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type SQLTests struct {
diff --git a/adapter/postgresql/template_test.go b/adapter/postgresql/template_test.go
index 5097fda..72876ef 100644
--- a/adapter/postgresql/template_test.go
+++ b/adapter/postgresql/template_test.go
@@ -4,8 +4,8 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 func TestTemplateSelect(t *testing.T) {
diff --git a/adapter/ql/bond_test.go b/adapter/ql/bond_test.go
index 65e9c42..7246f7b 100644
--- a/adapter/ql/bond_test.go
+++ b/adapter/ql/bond_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type BondTests struct {
diff --git a/adapter/ql/generic_test.go b/adapter/ql/generic_test.go
index 69e7380..fa50b8e 100644
--- a/adapter/ql/generic_test.go
+++ b/adapter/ql/generic_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type GenericTests struct {
diff --git a/adapter/ql/helper_test.go b/adapter/ql/helper_test.go
index cdd1ef6..2d06514 100644
--- a/adapter/ql/helper_test.go
+++ b/adapter/ql/helper_test.go
@@ -25,9 +25,9 @@ import (
 	"database/sql"
 	"os"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var settings = ConnectionURL{
diff --git a/adapter/ql/sql_test.go b/adapter/ql/sql_test.go
index 13a63b5..5119331 100644
--- a/adapter/ql/sql_test.go
+++ b/adapter/ql/sql_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type SQLTests struct {
diff --git a/adapter/ql/template_test.go b/adapter/ql/template_test.go
index e3d2517..803385c 100644
--- a/adapter/ql/template_test.go
+++ b/adapter/ql/template_test.go
@@ -4,8 +4,8 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 func TestTemplateSelect(t *testing.T) {
diff --git a/adapter/sqlite/bond_test.go b/adapter/sqlite/bond_test.go
index e6c2701..77e3f90 100644
--- a/adapter/sqlite/bond_test.go
+++ b/adapter/sqlite/bond_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type BondTests struct {
diff --git a/adapter/sqlite/generic_test.go b/adapter/sqlite/generic_test.go
index bd53216..abc5736 100644
--- a/adapter/sqlite/generic_test.go
+++ b/adapter/sqlite/generic_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type GenericTests struct {
diff --git a/adapter/sqlite/helper_test.go b/adapter/sqlite/helper_test.go
index c1e297b..c4fc225 100644
--- a/adapter/sqlite/helper_test.go
+++ b/adapter/sqlite/helper_test.go
@@ -25,9 +25,9 @@ import (
 	"database/sql"
 	"os"
 
-	db "github.com/upper/db"
-	"github.com/upper/db/internal/testsuite"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/internal/testsuite"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 var settings = ConnectionURL{
diff --git a/adapter/sqlite/sql_test.go b/adapter/sqlite/sql_test.go
index 4d7bcc1..62f5066 100644
--- a/adapter/sqlite/sql_test.go
+++ b/adapter/sqlite/sql_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db/internal/testsuite"
+	"github.com/upper/db/v4/internal/testsuite"
 )
 
 type SQLTests struct {
diff --git a/adapter/sqlite/template_test.go b/adapter/sqlite/template_test.go
index 0c871e3..8711567 100644
--- a/adapter/sqlite/template_test.go
+++ b/adapter/sqlite/template_test.go
@@ -4,8 +4,8 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 func TestTemplateSelect(t *testing.T) {
diff --git a/comparison_test.go b/comparison_test.go
index 5a7adcf..3d171fb 100644
--- a/comparison_test.go
+++ b/comparison_test.go
@@ -26,7 +26,7 @@ import (
 	"time"
 
 	"github.com/stretchr/testify/assert"
-	"github.com/upper/db/internal/adapter"
+	"github.com/upper/db/v4/internal/adapter"
 )
 
 func TestComparison(t *testing.T) {
diff --git a/internal/sqladapter/sqladapter_test.go b/internal/sqladapter/sqladapter_test.go
index 816a41a..773c76a 100644
--- a/internal/sqladapter/sqladapter_test.go
+++ b/internal/sqladapter/sqladapter_test.go
@@ -4,7 +4,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	"github.com/upper/db"
+	"github.com/upper/db/v4"
 )
 
 func TestInterfaces(t *testing.T) {
diff --git a/internal/testsuite/bond_suite.go b/internal/testsuite/bond_suite.go
index f6c6e8d..edc377a 100644
--- a/internal/testsuite/bond_suite.go
+++ b/internal/testsuite/bond_suite.go
@@ -6,9 +6,10 @@ import (
 	"time"
 
 	"database/sql"
+
 	"github.com/stretchr/testify/suite"
-	"github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	"github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 type Session struct {
diff --git a/internal/testsuite/generic_suite.go b/internal/testsuite/generic_suite.go
index 2eef7ca..c70c3a2 100644
--- a/internal/testsuite/generic_suite.go
+++ b/internal/testsuite/generic_suite.go
@@ -25,7 +25,7 @@ import (
 	"time"
 
 	"github.com/stretchr/testify/suite"
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 	"gopkg.in/mgo.v2/bson"
 )
 
diff --git a/internal/testsuite/sql_suite.go b/internal/testsuite/sql_suite.go
index ac7c817..335930c 100644
--- a/internal/testsuite/sql_suite.go
+++ b/internal/testsuite/sql_suite.go
@@ -12,7 +12,7 @@ import (
 
 	"github.com/sirupsen/logrus"
 	"github.com/stretchr/testify/suite"
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 )
 
 type artistType struct {
diff --git a/internal/testsuite/suite.go b/internal/testsuite/suite.go
index eea8f7f..df8a2f2 100644
--- a/internal/testsuite/suite.go
+++ b/internal/testsuite/suite.go
@@ -4,8 +4,8 @@ import (
 	"time"
 
 	"github.com/stretchr/testify/suite"
-	db "github.com/upper/db"
-	"github.com/upper/db/sqlbuilder"
+	db "github.com/upper/db/v4"
+	"github.com/upper/db/v4/sqlbuilder"
 )
 
 const TimeZone = "Canada/Eastern"
diff --git a/sqlbuilder/builder_test.go b/sqlbuilder/builder_test.go
index afe4526..1425922 100644
--- a/sqlbuilder/builder_test.go
+++ b/sqlbuilder/builder_test.go
@@ -6,7 +6,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 )
 
 func TestSelect(t *testing.T) {
diff --git a/sqlbuilder/placeholder_test.go b/sqlbuilder/placeholder_test.go
index 09f011b..6430ea9 100644
--- a/sqlbuilder/placeholder_test.go
+++ b/sqlbuilder/placeholder_test.go
@@ -4,7 +4,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-	db "github.com/upper/db"
+	db "github.com/upper/db/v4"
 )
 
 func TestPlaceholderSimple(t *testing.T) {
diff --git a/sqlbuilder/template_test.go b/sqlbuilder/template_test.go
index 69d28da..8d617e0 100644
--- a/sqlbuilder/template_test.go
+++ b/sqlbuilder/template_test.go
@@ -1,8 +1,8 @@
 package sqlbuilder
 
 import (
-	"github.com/upper/db/internal/cache"
-	"github.com/upper/db/internal/sqladapter/exql"
+	"github.com/upper/db/v4/internal/cache"
+	"github.com/upper/db/v4/internal/sqladapter/exql"
 )
 
 const (