Skip to content

Commit

Permalink
v5.0.0 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-martin authored Sep 10, 2018
1 parent 7a3ffce commit 6803bc2
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: go
services:
- docker

go_import_path: gopkg.in/doug-martin/goqu.v4
go_import_path: gopkg.in/doug-martin/goqu.v5

env:
- GO_VERSION="1.8"
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v5.0.0

* Drop go 1.6 support, supported versions are `1.8`, `1.9` and latest
* Add context support [#64](https://github.com/doug-martin/goqu/pull/64) - [@cmoad](https://github.com/cmoad)

## v4.2.0

* Add support for ON CONFLICT when using a dataset [#55](https://github.com/doug-martin/goqu/pull/55) - [@bobrnor](https://github.com/bobrnor)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ or hooks I would recommend looking at some of the great ORM libraries such as:
## Installation

```sh
go get -u gopkg.in/doug-martin/goqu.v4
go get -u gopkg.in/doug-martin/goqu.v5
```


Expand All @@ -63,17 +63,17 @@ go get -u gopkg.in/doug-martin/goqu.v4

In order to start using goqu with your database you need to load an adapter. We have included some adapters by default.

1. Postgres - `import "gopkg.in/doug-martin/goqu.v4/adapters/postgres"`
2. MySQL - `import "gopkg.in/doug-martin/goqu.v4/adapters/mysql"`
3. SQLite3 - `import "gopkg.in/doug-martin/goqu.v4/adapters/sqlite3"`
1. Postgres - `import "gopkg.in/doug-martin/goqu.v5/adapters/postgres"`
2. MySQL - `import "gopkg.in/doug-martin/goqu.v5/adapters/mysql"`
3. SQLite3 - `import "gopkg.in/doug-martin/goqu.v5/adapters/sqlite3"`

Adapters in goqu work the same way as a driver with the database in that they register themselves with goqu once loaded.

```go
import (
"database/sql"
"gopkg.in/doug-martin/goqu.v4"
_ "gopkg.in/doug-martin/goqu.v4/adapters/postgres"
"gopkg.in/doug-martin/goqu.v5"
_ "gopkg.in/doug-martin/goqu.v5/adapters/postgres"
_ "github.com/lib/pq"
)
```
Expand Down Expand Up @@ -709,7 +709,7 @@ For example the code for the postgres adapter is fairly short.
package postgres
import (
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)
//postgres requires a $ placeholder for prepared statements
Expand Down
2 changes: 1 addition & 1 deletion adapters/mysql/dataset_adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/c2fo/testify/assert"
"github.com/c2fo/testify/suite"
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

type datasetAdapterTest struct {
Expand Down
2 changes: 1 addition & 1 deletion adapters/mysql/mysql.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package mysql

import "gopkg.in/doug-martin/goqu.v4"
import "gopkg.in/doug-martin/goqu.v5"

var (
placeholder_rune = '?'
Expand Down
2 changes: 1 addition & 1 deletion adapters/mysql/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/c2fo/testify/assert"
"github.com/c2fo/testify/suite"
_ "github.com/go-sql-driver/mysql"
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion adapters/postgres/dataset_adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/c2fo/testify/suite"
"github.com/c2fo/testify/assert"
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

type datasetAdapterTest struct {
Expand Down
2 changes: 1 addition & 1 deletion adapters/postgres/postgres.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package postgres

import (
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

const placeholder_rune = '$'
Expand Down
2 changes: 1 addition & 1 deletion adapters/postgres/postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/c2fo/testify/assert"
"github.com/c2fo/testify/suite"
"github.com/lib/pq"
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

const schema = `
Expand Down
2 changes: 1 addition & 1 deletion adapters/sqlite3/dataset_adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/c2fo/testify/assert"
"github.com/c2fo/testify/suite"
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

type datasetAdapterTest struct {
Expand Down
2 changes: 1 addition & 1 deletion adapters/sqlite3/sqlite3.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sqlite3

import "gopkg.in/doug-martin/goqu.v4"
import "gopkg.in/doug-martin/goqu.v5"

var (
placeholder_rune = '?'
Expand Down
2 changes: 1 addition & 1 deletion adapters/sqlite3/sqlite3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/c2fo/testify/assert"
"github.com/c2fo/testify/suite"
_ "github.com/mattn/go-sqlite3"
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ type (
// import (
// "database/sql"
// "fmt"
// "gopkg.in/doug-martin/goqu.v4"
// _ "gopkg.in/doug-martin/goqu.v4/adapters/postgres"
// "gopkg.in/doug-martin/goqu.v5"
// _ "gopkg.in/doug-martin/goqu.v5/adapters/postgres"
// _ "github.com/lib/pq"
// )
//
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ services:
goqu:
image: "golang:${GO_VERSION}"
command: bash -c "sleep 30 && go test -v -race ./..."
working_dir: /go/src/gopkg.in/doug-martin/goqu.v4
working_dir: /go/src/gopkg.in/doug-martin/goqu.v5
volumes:
- "./:/go/src/gopkg.in/doug-martin/goqu.v4"
- "./:/go/src/gopkg.in/doug-martin/goqu.v5"
environment:
MYSQL_URI: 'root@tcp(mysql:3306)/goqumysql?parseTime=true'
PG_URI: 'postgres://postgres:@postgres:5432/goqupostgres?sslmode=disable'
Expand All @@ -32,9 +32,9 @@ services:
goqu-coverage:
image: "golang:${GO_VERSION}"
command: bash -c "sleep 30 && ./go.test.sh"
working_dir: /go/src/gopkg.in/doug-martin/goqu.v4
working_dir: /go/src/gopkg.in/doug-martin/goqu.v5
volumes:
- "./:/go/src/gopkg.in/doug-martin/goqu.v4"
- "./:/go/src/gopkg.in/doug-martin/goqu.v5"
environment:
MYSQL_URI: 'root@tcp(mysql:3306)/goqumysql?parseTime=true'
PG_URI: 'postgres://postgres:@postgres:5432/goqupostgres?sslmode=disable'
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"

"gopkg.in/DATA-DOG/go-sqlmock.v1"
"gopkg.in/doug-martin/goqu.v4"
"gopkg.in/doug-martin/goqu.v5"
)

var driver *sql.DB
Expand Down

0 comments on commit 6803bc2

Please sign in to comment.