mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-08 15:39:59 +08:00
14 lines
257 B
Go
14 lines
257 B
Go
|
|
package postgres
|
||
|
|
|
||
|
|
import (
|
||
|
|
"zero/core/stores/sqlx"
|
||
|
|
|
||
|
|
_ "github.com/lib/pq"
|
||
|
|
)
|
||
|
|
|
||
|
|
const postgreDriverName = "postgres"
|
||
|
|
|
||
|
|
func NewPostgre(datasource string, opts ...sqlx.SqlOption) sqlx.SqlConn {
|
||
|
|
return sqlx.NewSqlConn(postgreDriverName, datasource, opts...)
|
||
|
|
}
|