postgresql.go 274 B

123456789101112
  1. package postgres
  2. import (
  3. _ "github.com/lib/pq"
  4. "github.com/tal-tech/go-zero/core/stores/sqlx"
  5. )
  6. const postgresDriverName = "postgres"
  7. func New(datasource string, opts ...sqlx.SqlOption) sqlx.SqlConn {
  8. return sqlx.NewSqlConn(postgresDriverName, datasource, opts...)
  9. }