Files
go-zero/core/stores/postgres/postgresql.go

13 lines
279 B
Go
Raw Normal View History

2020-07-26 17:09:05 +08:00
package postgres
import (
_ "github.com/lib/pq"
2020-08-08 16:40:10 +08:00
"github.com/tal-tech/go-zero/core/stores/sqlx"
2020-07-26 17:09:05 +08:00
)
const postgreDriverName = "postgres"
func NewPostgre(datasource string, opts ...sqlx.SqlOption) sqlx.SqlConn {
return sqlx.NewSqlConn(postgreDriverName, datasource, opts...)
}