NewDb returns a new sqlx DB wrapper for a pre-existing *sql.DB. The driverName of the original database is required for named query support. lint:ignore ST1003 changing this would break the package interface.
(db *sql.DB, driverName string)
| 252 | // |
| 253 | //lint:ignore ST1003 changing this would break the package interface. |
| 254 | func NewDb(db *sql.DB, driverName string) *DB { |
| 255 | return &DB{DB: db, driverName: driverName, Mapper: mapper()} |
| 256 | } |
| 257 | |
| 258 | // DriverName returns the driverName passed to the Open function for this DB. |
| 259 | func (db *DB) DriverName() string { |