MCPcopy Index your code
hub / github.com/upper/db / Open

Function Open

adapter/postgresql/postgresql.go:39–41  ·  view source on GitHub ↗

Open establishes a connection to the database server and returns a sqlbuilder.Session instance (which is compatible with db.Session).

(connURL db.ConnectionURL)

Source from the content-addressed store, hash-verified

37// Open establishes a connection to the database server and returns a
38// sqlbuilder.Session instance (which is compatible with db.Session).
39func Open(connURL db.ConnectionURL) (db.Session, error) {
40 return registeredAdapter.OpenDSN(connURL)
41}
42
43// NewTx creates a sqlbuilder.Tx instance by wrapping a *sql.Tx value.
44func NewTx(sqlTx *sql.Tx) (sqlbuilder.Tx, error) {

Callers 3

SetUpMethod · 0.70

Calls 1

OpenDSNMethod · 0.65

Tested by 3

SetUpMethod · 0.56