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