postgresql.go 298 B

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