Merge branch 'gogf:master' into master

This commit is contained in:
wenzi
2022-05-13 22:00:49 +08:00
committed by GitHub

View File

@ -1,15 +1,30 @@
# drivers
Database drivers for package gdb.
Powerful database drivers for package gdb.
# Installation
Let's take `pgsql` for example.
Let's take `mysql` for example.
```
go get -u github.com/gogf/gf/contrib/drivers/pgsql/v2
go get -u github.com/gogf/gf/contrib/drivers/mysql/v2
```
Choose and import the driver to your project:
```
import _ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
import _ "github.com/gogf/gf/contrib/drivers/mysql/v2"
```
Commonly imported at top of `main.go`:
```go
package main
import (
_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
// Other imported packages.
)
func main() {
// Main logics.
}
```
# Supported Drivers