func NewReader(db *sql.DB, driverName string, dest interface{}, query string,
) (*Reader, error) {

	sqlxDB := sqlx.NewDb(db, driverName)

	rows, err := sqlxDB.Queryx(query)
	if err != nil {
		return nil, err
	}

	return &Reader{db: sqlxDB, dest: dest, query: query, rows: rows}, nil
}
// NewReader returns a new reader that reads from db by runs the given query
// and maps rows into dest.
NewReader returns a new reader that reads from db by runs the given query
and maps rows into dest.
// NewReader returns a new reader that reads from db by runs the given query // and maps rows into dest .
func NewReader(db *sql.DB, driverName string, dest interface{}, query string,
) (*Reader, error) {
	sqlxDB := sqlx.NewDb(db, driverName)
	rows, err := sqlxDB.Queryx(query)
	if err != nil {
		return nil, err
	}
	return &Reader{db: sqlxDB, dest: dest, query: query, rows: rows}, nil
}
func NewReader ( db * sql . DB , driverName string , dest interface { } , query string , ) ( * Reader , error ) { sqlxDB := sqlx . NewDb ( db , driverName ) rows , err := sqlxDB . Queryx ( query ) if err != nil { return nil , err } return & Reader { db : sqlxDB , dest : dest , query : query , rows : rows } , nil }
NewReader returns a new reader that reads from db by runs the given query
and maps rows into dest.
NewReader returns a new reader that reads from db by runs the given query and maps rows into dest .