github.com/lingyao2333/mo-zero@v1.4.1/core/stores/postgres/postgresql.go (about)

     1  package postgres
     2  
     3  import (
     4  	// imports the driver, don't remove this comment, golint requires.
     5  	_ "github.com/lib/pq"
     6  	"github.com/lingyao2333/mo-zero/core/stores/sqlx"
     7  )
     8  
     9  const postgresDriverName = "postgres"
    10  
    11  // New returns a postgres connection.
    12  func New(datasource string, opts ...sqlx.SqlOption) sqlx.SqlConn {
    13  	return sqlx.NewSqlConn(postgresDriverName, datasource, opts...)
    14  }