Beginx begins a transaction and returns an *sqlx.Tx instead of an *sql.Tx.
()
| 339 | |
| 340 | // Beginx begins a transaction and returns an *sqlx.Tx instead of an *sql.Tx. |
| 341 | func (db *DB) Beginx() (*Tx, error) { |
| 342 | tx, err := db.DB.Begin() |
| 343 | if err != nil { |
| 344 | return nil, err |
| 345 | } |
| 346 | return &Tx{Tx: tx, driverName: db.driverName, unsafe: db.unsafe, Mapper: db.Mapper}, err |
| 347 | } |
| 348 | |
| 349 | // Queryx queries the database and returns an *sqlx.Rows. |
| 350 | // Any placeholder parameters are replaced with supplied args. |
no outgoing calls