Queryx queries the database and returns an *sqlx.Rows. Any placeholder parameters are replaced with supplied args.
(query string, args ...interface{})
| 349 | // Queryx queries the database and returns an *sqlx.Rows. |
| 350 | // Any placeholder parameters are replaced with supplied args. |
| 351 | func (db *DB) Queryx(query string, args ...interface{}) (*Rows, error) { |
| 352 | r, err := db.DB.Query(query, args...) |
| 353 | if err != nil { |
| 354 | return nil, err |
| 355 | } |
| 356 | return &Rows{Rows: r, unsafe: db.unsafe, Mapper: db.Mapper}, err |
| 357 | } |
| 358 | |
| 359 | // QueryRowx queries the database and returns an *sqlx.Row. |
| 360 | // Any placeholder parameters are replaced with supplied args. |