mapserver/server/mapobjectdb/postgres/new.go
NatureFreshMilk fba3f118d8 fix #19
2019-03-21 15:07:09 +01:00

18 lines
285 B
Go

package postgres
import (
"database/sql"
_ "github.com/mattn/go-sqlite3"
)
func New(connStr string) (*PostgresAccessor, error) {
db, err := sql.Open("postgres", connStr+" sslmode=disable")
if err != nil {
return nil, err
}
sq := &PostgresAccessor{db: db}
return sq, nil
}