Skip to content

Glossary: Go in Practice

sql.Open

Also written: db.PingContext, PingContext

Takes a registered driver name and a DSN and returns a `*sql.DB` pool, but doesn't connect. `db.PingContext` actually connects, creating the SQLite file if needed.

Where the book teaches it

Related terms

Connection poolData source name (DSN)Blank import