1
0
forked from MTSR/mapserver
mapserver/mapobjectdb/postgres/new.go

19 lines
277 B
Go
Raw Normal View History

2019-03-21 17:07:09 +03:00
package postgres
import (
"database/sql"
_ "modernc.org/sqlite"
2019-03-21 17:07:09 +03:00
)
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
}