Skip to content

Commit

Permalink
Update for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-martin authored Mar 15, 2017
1 parent 694b41d commit 118b59a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,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.v3
go get -u gopkg.in/doug-martin/goqu.v4
```


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

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.v3/adapters/postgres"`
2. MySQL - `import "gopkg.in/doug-martin/goqu.v3/adapters/mysql"`
3. SQLite3 - `import "gopkg.in/doug-martin/goqu.v3/adapters/sqlite3"`
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"`

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.v3"
_ "gopkg.in/doug-martin/goqu.v3/adapters/postgres"
"gopkg.in/doug-martin/goqu.v4"
_ "gopkg.in/doug-martin/goqu.v4/adapters/postgres"
_ "github.com/lib/pq"
)
```
Expand Down Expand Up @@ -710,7 +710,7 @@ For example the code for the postgres adapter is fairly short.
package postgres
import (
"gopkg.in/doug-martin/goqu.v3"
"gopkg.in/doug-martin/goqu.v4"
)
//postgres requires a $ placeholder for prepared statements
Expand Down Expand Up @@ -783,3 +783,4 @@ GO_VERSION=latest docker-compose run goqu
## License

`goqu` is released under the [MIT License](http://www.opensource.org/licenses/MIT).

0 comments on commit 118b59a

Please sign in to comment.